update regex matching - now bot responds only for base commands (like /ping) and with mention (like /ping@panfilovi4_bot) and ignores command if it mentions other bot;

Add ability to see, change and list gemini, mistral and ollama models
This commit is contained in:
2026-01-20 08:31:05 +03:00
parent c31345a3eb
commit 32baaebb93
52 changed files with 605 additions and 231 deletions
+4 -2
View File
@@ -8,7 +8,9 @@ import {editMessageText} from "../util/utils";
import {Environment} from "../common/environment";
export class OllamaSearch extends ChatCommand {
regexp = /^\/(s|search)\s([^]+)/;
command = ["s", "search"];
argsMode = "required" as const;
title = "/search";
description = "Web search via Ollama";
@@ -29,7 +31,7 @@ export class OllamaSearch extends ChatCommand {
parse_mode: "Markdown"
});
const results = await ollama.webSearch({query: match?.[2]});
const results = await ollama.webSearch({query: match?.[3]});
console.log("results", results);
let message = "Результаты:\n\n";