Skip to content

Commit 39ce28e

Browse files
authored
Merge pull request #216 from MeDott29/implement-grok-beta
Implement grok beta
2 parents 84d5b10 + 6853b43 commit 39ce28e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

core/src/core/generation.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ export async function generateText({
113113

114114
case ModelProvider.GROK: {
115115
prettyConsole.log("Initializing Grok model.");
116-
const grok = createGroq({ apiKey });
116+
const serverUrl = models[provider].endpoint;
117+
const grok = createOpenAI({ apiKey, baseURL: serverUrl });
117118

118119
const { text: grokResponse } = await aiGenerateText({
119120
model: grok.languageModel(model, {

core/src/core/models.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ const models: Models = {
7474
},
7575
endpoint: "https://api.x.ai/v1",
7676
model: {
77-
[ModelClass.SMALL]: "grok-2-beta",
78-
[ModelClass.MEDIUM]: "grok-2-beta",
79-
[ModelClass.LARGE]: "grok-2-beta",
80-
[ModelClass.EMBEDDING]: "grok-2-beta", // not sure about this one
77+
[ModelClass.SMALL]: "grok-beta",
78+
[ModelClass.MEDIUM]: "grok-beta",
79+
[ModelClass.LARGE]: "grok-beta",
80+
[ModelClass.EMBEDDING]: "grok-beta", // not sure about this one
8181
},
8282
},
8383
[ModelProvider.GROQ]: {

0 commit comments

Comments
 (0)