a736f786c2
- add /openai (/chatgpt) chat command using OpenAI Responses API (streaming + incremental edits) - add /openAIListModels, /openAIGetModel, /openAISetModel - introduce base Command class and migrate non-chat commands to it - wire OpenAI client + env vars (OPENAI_API_KEY, OPENAI_MODEL) - bump deps (@google/genai, systeminformation, @types/node) and add openai
14 lines
552 B
TypeScript
14 lines
552 B
TypeScript
import {Command} from "../base/command";
|
||
import {Message} from "typescript-telegram-bot-api";
|
||
import {logError, oldReplyToMessage, randomValue} from "../util/utils";
|
||
import {Environment} from "../common/environment";
|
||
|
||
export class Test extends Command {
|
||
regexp = /^(test|тест|еуые|ntcn|инноке(нтий|ш|нтич))/i;
|
||
title = "тест";
|
||
description = "System functionality check";
|
||
|
||
async execute(msg: Message) {
|
||
await oldReplyToMessage(msg, randomValue(Environment.ANSWERS.test) || "а").catch(logError);
|
||
}
|
||
} |