Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow users to configure models for grok #1091

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading