support for thinking models, ux improvements
This commit is contained in:
@@ -9,18 +9,22 @@ export class OllamaGetModel extends ChatCommand {
|
||||
description = "Ollama model info";
|
||||
|
||||
async execute(msg: Message): Promise<void> {
|
||||
try {
|
||||
const showResponse = await ollama.show({model: Environment.OLLAMA_MODEL});
|
||||
|
||||
const showResponse = await ollama.show({model: Environment.OLLAMA_MODEL});
|
||||
const caps = showResponse.capabilities;
|
||||
|
||||
const caps = showResponse.capabilities;
|
||||
const text = "```Ollama\n" +
|
||||
`model: ${Environment.OLLAMA_MODEL}\n\n` +
|
||||
`vision: ${boolToEmoji(caps.includes("vision"))}\n` +
|
||||
`thinking: ${boolToEmoji(caps.includes("thinking"))}\n` +
|
||||
`tools: ${boolToEmoji(caps.includes("tools"))}`
|
||||
+ "```";
|
||||
|
||||
const text = "```ollama\n" +
|
||||
`model: ${Environment.OLLAMA_MODEL}\n\n` +
|
||||
`vision: ${boolToEmoji(caps.includes("vision"))}\n` +
|
||||
`thinking: ${boolToEmoji(caps.includes("thinking"))}\n` +
|
||||
`tools: ${boolToEmoji(caps.includes("tools"))}`
|
||||
+ "```";
|
||||
|
||||
await replyToMessage({message: msg, text: text, parse_mode: "Markdown"}).catch(logError);
|
||||
await replyToMessage({message: msg, text: text, parse_mode: "Markdown"}).catch(logError);
|
||||
} catch (e) {
|
||||
logError(e);
|
||||
await replyToMessage({message: msg, text: e.toString()}).catch(logError);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user