support custom models

This commit is contained in:
rentianyue-jk 2024-07-16 10:22:54 +08:00
parent 8efd444ba2
commit 1b7ae5457f
2 changed files with 3 additions and 1 deletions

View File

@ -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,

View File

@ -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}