aiwrapper
Version:
A Universal AI Wrapper for JavaScript & TypeScript
21 lines (20 loc) • 635 B
JavaScript
import { OpenAIChatCompletionsLang } from "../openai/openai-chat-completions-lang.js";
class MistralLang extends OpenAIChatCompletionsLang {
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"
});
if (!this.modelInfo) {
console.error(`Invalid Mistral model: ${modelName}. Model not found in aimodels database.`);
}
}
}
export {
MistralLang
};
//# sourceMappingURL=mistral-lang.js.map