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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user