✨ Mistral API provider
This commit is contained in:
parent
83b39dade6
commit
623cc42010
3 changed files with 16 additions and 10 deletions
|
|
@ -4,7 +4,8 @@ import OpenAI from "./OpenAI";
|
|||
class Mistral extends OpenAI {
|
||||
static providerName: ModelProvider = "mistral";
|
||||
static defaultOptions: Partial<LLMOptions> = {
|
||||
apiBase: "https://api.mistral.ai/v1",
|
||||
apiBase: "https://api.mistral.ai",
|
||||
model: "mistral-small",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import HuggingFaceTGI from "./HuggingFaceTGI";
|
|||
import LMStudio from "./LMStudio";
|
||||
import LlamaCpp from "./LlamaCpp";
|
||||
import Llamafile from "./Llamafile";
|
||||
import Mistral from "./Mistral";
|
||||
import Ollama from "./Ollama";
|
||||
import OpenAI from "./OpenAI";
|
||||
import Replicate from "./Replicate";
|
||||
|
|
@ -32,6 +33,7 @@ const LLMs = [
|
|||
OpenAI,
|
||||
LMStudio,
|
||||
Gemini,
|
||||
Mistral,
|
||||
];
|
||||
|
||||
export function llmFromDescription(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// import { BaseLLM } from "..";
|
||||
// import { CompletionOptions } from "../..";
|
||||
// import GooglePalm from "../llms/GooglePalm";
|
||||
// import Mistral from "../llms/Mistral";
|
||||
|
||||
// jest.setTimeout(100_000);
|
||||
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
// test("Stream Chat works", async () => {
|
||||
// let total = "";
|
||||
// for await (const chunk of llm.streamChat([
|
||||
// { role: "user", content: "Hello" },
|
||||
// { role: "user", content: "Tell a story" },
|
||||
// ])) {
|
||||
// total += chunk.content;
|
||||
// }
|
||||
|
|
@ -94,14 +94,17 @@
|
|||
// // // testLLM(new TextGenWebUI({ model: "codellama-7b" }));
|
||||
// // // testLLM(new HuggingFaceTGI({ model: "codellama-7b" }));
|
||||
// // // testLLM(new HuggingFaceInferenceAPI({ model: "codellama-7b" }));
|
||||
// testLLM(
|
||||
// new GooglePalm({
|
||||
// model: "gemini-pro",
|
||||
// // model: "chat-bison-001",
|
||||
// apiKey: process.env.GOOGLE_PALM_API_KEY,
|
||||
// })
|
||||
// );
|
||||
// // testLLM(
|
||||
// // new GooglePalm({
|
||||
// // model: "gemini-pro",
|
||||
// // // model: "chat-bison-001",
|
||||
// // apiKey: process.env.GOOGLE_PALM_API_KEY,
|
||||
// // })
|
||||
// // );
|
||||
// // testLLM(
|
||||
// // new Gemini({ model: "gemini-pro", apiKey: process.env.GOOGLE_PALM_API_KEY })
|
||||
// // );
|
||||
// testLLM(
|
||||
// new Mistral({ apiKey: process.env.MISTRAL_API_KEY, model: "mistral-small" })
|
||||
// );
|
||||
// });
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue