update @mistralai lib
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user