feat(ai): improve runtime capability reporting and context settings
Add explicit chat capability tracking, expose formatted runtime capabilities in the info command, and support a max context size option for user AI settings. Also update Ollama base URL resolution to use OLLAMA_ADDRESS and simplify provider chat command execution.
This commit is contained in:
@@ -16,10 +16,12 @@ export class OllamaChat extends ChatCommand {
|
||||
description = Environment.commandDescriptions.ollamaChat;
|
||||
|
||||
async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
|
||||
return this.executeOllama(msg, match?.[3] || "", match?.[1]?.toLowerCase()?.startsWith("think"));
|
||||
}
|
||||
|
||||
async executeOllama(msg: Message, text: string, think: boolean = false): Promise<void> {
|
||||
await runUnifiedAi({provider: AiProvider.OLLAMA, msg, text, stream: true, think: think});
|
||||
await runUnifiedAi({
|
||||
provider: AiProvider.OLLAMA,
|
||||
msg: msg,
|
||||
text: match?.[3] ?? "",
|
||||
stream: true,
|
||||
think: match?.[1]?.toLowerCase()?.startsWith("think")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user