continue-custom/core/llm/llms/xAI.ts
Dallin Romney b4dcb6cc37 grok-beta
2024-11-05 17:19:25 -08:00

20 lines
511 B
TypeScript

import { LLMOptions, ModelProvider } from "../../index.js";
import OpenAI from "./OpenAI.js";
class xAI extends OpenAI {
static providerName: ModelProvider = "xAI";
static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://api.x.ai/v1/",
};
private static MODEL_IDS: { [name: string]: string } = {
"grok-beta": "grok-beta", // Future names might not line up
};
protected _convertModelName(model: string) {
return xAI.MODEL_IDS[model] || this.model;
}
}
export default xAI;