checking models capabilities

This commit is contained in:
2026-02-12 14:22:43 +03:00
parent 77d0ca2f38
commit 2026c673f5
12 changed files with 216 additions and 86 deletions
+2 -4
View File
@@ -59,8 +59,7 @@ export class OllamaChat extends ChatCommand {
try {
const modelInfo = await commands.find(c => c instanceof OllamaGetModel).loadImageModelInfo();
if (modelInfo) {
const caps = modelInfo.capabilities || [];
if (!caps.includes("vision")) {
if (!modelInfo.vision?.supported) {
await replyToMessage({
message: msg,
text: "Моя текущая модель не умеет анализировать изображения 🥹"
@@ -77,8 +76,7 @@ export class OllamaChat extends ChatCommand {
try {
const modelInfo = await commands.find(c => c instanceof OllamaGetModel).loadThinkModelInfo();
if (modelInfo) {
const caps = modelInfo.capabilities || [];
if (!caps.includes("thinking")) {
if (!modelInfo.thinking?.supported) {
await replyToMessage({
message: msg,
text: "Моя текущая модель не умеет размышлять 🥹"