UNPKG

aiwrapper

Version:

A Universal AI Wrapper for JavaScript & TypeScript

18 lines 719 B
import { OpenAILikeLang } from "../openai-like/openai-like-lang.js"; export class MistralLang extends OpenAILikeLang { constructor(options) { const modelName = options.model || "mistral-large-latest"; super({ apiKey: options.apiKey, model: modelName, systemPrompt: options.systemPrompt || "", maxTokens: options.maxTokens, baseURL: "https://api.mistral.ai/v1", }); // For Mistral, we require the model to be in aimodels database if (!this.modelInfo) { console.error(`Invalid Mistral model: ${modelName}. Model not found in aimodels database.`); } } } //# sourceMappingURL=mistral-lang.js.map