Skip to content

Commit

Permalink
Merge pull request #668 from v1xingyue/v1xingyue-patch-1
Browse files Browse the repository at this point in the history
redpill custom models
  • Loading branch information
lalalune authored Nov 29, 2024
2 parents d528afd + 12421f1 commit b2e2413
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
13 changes: 11 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OPENAI_API_KEY= # OpenAI API key, starting with sk-
ETERNALAI_URL=
ETERNALAI_API_KEY=

REDPILL_API_KEY= # REDPILL API Key

GROK_API_KEY= # GROK API Key
GROQ_API_KEY= # Starts with gsk_
OPENROUTER_API_KEY=
Expand Down Expand Up @@ -54,6 +54,15 @@ SMALL_OPENROUTER_MODEL=
MEDIUM_OPENROUTER_MODEL=
LARGE_OPENROUTER_MODEL=


# REDPILL Configuration
# https://docs.red-pill.ai/get-started/supported-models
REDPILL_API_KEY= # REDPILL API Key
REDPILL_MODEL=
SMALL_REDPILL_MODEL= # Default: gpt-4o-mini
MEDIUM_REDPILL_MODEL= # Default: gpt-4o
LARGE_REDPILL_MODEL= # Default: gpt-4o

# Ollama Configuration
OLLAMA_SERVER_URL= # Default: localhost:11434
OLLAMA_MODEL=
Expand Down Expand Up @@ -155,4 +164,4 @@ DSTACK_SIMULATOR_ENDPOINT=
WALLET_SECRET_SALT=secret_salt

# Galadriel Configuration
GALADRIEL_API_KEY=gal-* # Get from https://dashboard.galadriel.com/
GALADRIEL_API_KEY=gal-* # Get from https://dashboard.galadriel.com/
15 changes: 12 additions & 3 deletions packages/core/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,18 @@ export const models: Models = {
// Available models: https://docs.red-pill.ai/get-started/supported-models
// To test other models, change the models below
model: {
[ModelClass.SMALL]: "gpt-4o-mini", // [ModelClass.SMALL]: "claude-3-5-sonnet-20241022",
[ModelClass.MEDIUM]: "gpt-4o", // [ModelClass.MEDIUM]: "claude-3-5-sonnet-20241022",
[ModelClass.LARGE]: "gpt-4o", // [ModelClass.LARGE]: "claude-3-opus-20240229",
[ModelClass.SMALL]:
settings.SMALL_REDPILL_MODEL ||
settings.REDPILL_MODEL ||
"gpt-4o-mini",
[ModelClass.MEDIUM]:
settings.MEDIUM_REDPILL_MODEL ||
settings.REDPILL_MODEL ||
"gpt-4o",
[ModelClass.LARGE]:
settings.LARGE_REDPILL_MODEL ||
settings.REDPILL_MODEL ||
"gpt-4o",
[ModelClass.EMBEDDING]: "text-embedding-3-small",
},
},
Expand Down

0 comments on commit b2e2413

Please sign in to comment.