From 3d70889e139bd05e006ce704942d76dc91d051a4 Mon Sep 17 00:00:00 2001 From: v1xingyue Date: Fri, 29 Nov 2024 18:18:24 +0800 Subject: [PATCH 1/2] REDPILL custom model --- .env.example | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 9137ee4ff7..610fd5fbc6 100644 --- a/.env.example +++ b/.env.example @@ -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= @@ -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= @@ -155,4 +164,4 @@ DSTACK_SIMULATOR_ENDPOINT= WALLET_SECRET_SALT=secret_salt # Galadriel Configuration -GALADRIEL_API_KEY=gal-* # Get from https://dashboard.galadriel.com/ \ No newline at end of file +GALADRIEL_API_KEY=gal-* # Get from https://dashboard.galadriel.com/ From 12421f1ee197c14766decb4febe6ede72e2c041f Mon Sep 17 00:00:00 2001 From: v1xingyue Date: Fri, 29 Nov 2024 18:20:00 +0800 Subject: [PATCH 2/2] custom redpill model --- packages/core/src/models.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/core/src/models.ts b/packages/core/src/models.ts index bef3e45c1d..b35b009aa6 100644 --- a/packages/core/src/models.ts +++ b/packages/core/src/models.ts @@ -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", }, },