update @mistralai lib

This commit is contained in:
2026-05-01 05:35:37 +03:00
parent 0a34e15a22
commit ac51702f00
6 changed files with 18 additions and 13 deletions
+4 -2
View File
@@ -6,6 +6,7 @@ import {Requirements} from "../base/requirements";
import {Requirement} from "../base/requirement";
import {mistralAi} from "../index";
import {AiModelCapabilities} from "../model/ai-model-capabilities";
import {BaseModelCard} from "@mistralai/mistralai/models/components/basemodelcard";
export class MistralGetModel extends Command {
title = "/mistralGetModel";
@@ -19,14 +20,15 @@ export class MistralGetModel extends Command {
async getModelCapabilities(): Promise<AiModelCapabilities | null> {
try {
const info = await mistralAi.models.retrieve({modelId: Environment.MISTRAL_MODEL});
const info: BaseModelCard = await mistralAi.models.retrieve({modelId: Environment.MISTRAL_MODEL}) as BaseModelCard;
console.log(info);
return {
vision: {supported: info.capabilities.vision},
ocr: {supported: info.capabilities.ocr},
thinking: null,
tools: {supported: info.capabilities.functionCalling}
tools: {supported: info.capabilities.functionCalling},
audio: {supported: info.capabilities.audioTranscription}
};
} catch (e) {
logError(e);