Skip to content

Commit

Permalink
Merge pull request #1091 from oxSaturn/feat/configure-models-grok-2
Browse files Browse the repository at this point in the history
feat: allow users to configure models for grok
  • Loading branch information
monilpat authored Dec 14, 2024
2 parents 82b475f + 592287d commit dadaae3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ SMALL_REDPILL_MODEL= # Default: gpt-4o-mini
MEDIUM_REDPILL_MODEL= # Default: gpt-4o
LARGE_REDPILL_MODEL= # Default: gpt-4o

# Grok Configuration
SMALL_GROK_MODEL= # Default: grok-2-1212
MEDIUM_GROK_MODEL= # Default: grok-2-1212
LARGE_GROK_MODEL= # Default: grok-2-1212
EMBEDDING_GROK_MODEL= # Default: grok-2-1212

# Ollama Configuration
OLLAMA_SERVER_URL= # Default: localhost:11434
OLLAMA_MODEL=
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ export const models: Models = {
},
endpoint: "https://api.x.ai/v1",
model: {
[ModelClass.SMALL]: "grok-beta",
[ModelClass.MEDIUM]: "grok-beta",
[ModelClass.LARGE]: "grok-beta",
[ModelClass.EMBEDDING]: "grok-beta", // not sure about this one
[ModelClass.SMALL]: settings.SMALL_GROK_MODEL || "grok-2-1212",
[ModelClass.MEDIUM]: settings.MEDIUM_GROK_MODEL || "grok-2-1212",
[ModelClass.LARGE]: settings.LARGE_GROK_MODEL || "grok-2-1212",
[ModelClass.EMBEDDING]: settings.EMBEDDING_GROK_MODEL || "grok-2-1212", // not sure about this one
},
},
[ModelProviderName.GROQ]: {
Expand Down

0 comments on commit dadaae3

Please sign in to comment.