fix match
This commit is contained in:
@@ -14,7 +14,7 @@ export class GeminiSetModel extends ChatCommand {
|
|||||||
requirements = Requirements.Build(Requirement.BOT_CREATOR);
|
requirements = Requirements.Build(Requirement.BOT_CREATOR);
|
||||||
|
|
||||||
async execute(msg: Message, match?: RegExpExecArray | null): Promise<void> {
|
async execute(msg: Message, match?: RegExpExecArray | null): Promise<void> {
|
||||||
const newModel = match?.[1];
|
const newModel = match?.[3];
|
||||||
Environment.setGeminiModel(newModel || Environment.GEMINI_MODEL);
|
Environment.setGeminiModel(newModel || Environment.GEMINI_MODEL);
|
||||||
|
|
||||||
const text = newModel ? `Выбрана модель "${newModel}"`
|
const text = newModel ? `Выбрана модель "${newModel}"`
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export class MistralSetModel extends ChatCommand {
|
|||||||
requirements = Requirements.Build(Requirement.BOT_CREATOR);
|
requirements = Requirements.Build(Requirement.BOT_CREATOR);
|
||||||
|
|
||||||
async execute(msg: Message, match?: RegExpExecArray | null): Promise<void> {
|
async execute(msg: Message, match?: RegExpExecArray | null): Promise<void> {
|
||||||
const newModel = match?.[1];
|
const newModel = match?.[3];
|
||||||
Environment.setMistralModel(newModel || Environment.MISTRAL_MODEL);
|
Environment.setMistralModel(newModel || Environment.MISTRAL_MODEL);
|
||||||
|
|
||||||
const text = newModel ? `Выбрана модель "${newModel}"`
|
const text = newModel ? `Выбрана модель "${newModel}"`
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export class OllamaSetModel extends ChatCommand {
|
|||||||
requirements = Requirements.Build(Requirement.BOT_CREATOR);
|
requirements = Requirements.Build(Requirement.BOT_CREATOR);
|
||||||
|
|
||||||
async execute(msg: Message, match?: RegExpExecArray | null): Promise<void> {
|
async execute(msg: Message, match?: RegExpExecArray | null): Promise<void> {
|
||||||
const newModel = match?.[1];
|
const newModel = match?.[3];
|
||||||
Environment.setOllamaModel(newModel || Environment.OLLAMA_MODEL);
|
Environment.setOllamaModel(newModel || Environment.OLLAMA_MODEL);
|
||||||
|
|
||||||
const text = newModel ? `Выбрана модель "${newModel}"`
|
const text = newModel ? `Выбрана модель "${newModel}"`
|
||||||
|
|||||||
Reference in New Issue
Block a user