Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

support custom models

rentianyue-jk1b7ae5457f68
diff --git a/apps/api/src/lib/LLM-extraction/models.ts b/apps/api/src/lib/LLM-extraction/models.ts
index 8de8ee4bd..d190c495d 100644
--- a/apps/api/src/lib/LLM-extraction/models.ts
+++ b/apps/api/src/lib/LLM-extraction/models.ts
@@ -48,7 +48,7 @@ function prepareOpenAIDoc(
export async function generateOpenAICompletions({
client,
- model = "gpt-4o",
+ model = process.env.MODEL_NAME,
document,
schema, //TODO - add zod dynamic type checking
prompt = defaultPrompt,
diff --git a/docker-compose.yaml b/docker-compose.yaml
index b88f3ed89..b785308a6 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -12,6 +12,8 @@ x-common-service: &common-service
- PORT=${PORT:-3002}
- NUM_WORKERS_PER_QUEUE=${NUM_WORKERS_PER_QUEUE}
- OPENAI_API_KEY=${OPENAI_API_KEY}
+ - OPENAI_BASE_URL=${OPENAI_BASE_URL}
+ - MODEL_NAME=${MODEL_NAME:-gpt-4o}
- SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL}
- SERPER_API_KEY=${SERPER_API_KEY}
- LLAMAPARSE_API_KEY=${LLAMAPARSE_API_KEY}