Elffuss BraidHub

kikocis/continue public

9c134d8c1202 · 481 BRawPermalink
1import { LLMOptions } from "../../index.js";
2
3import OpenAI from "./OpenAI.js";
4
5class xAI extends OpenAI {
6 static providerName = "xAI";
7 static defaultOptions: Partial<LLMOptions> = {
8 apiBase: "https://api.x.ai/v1/",
9 };
10
11 private static MODEL_IDS: { [name: string]: string } = {
12 "grok-beta": "grok-beta", // Future names might not line up
13 };
14
15 protected _convertModelName(model: string) {
16 return xAI.MODEL_IDS[model] || this.model;
17 }
18}
19
20export default xAI;