From 9052dc5e75041422664737bdb00a97a02b549650 Mon Sep 17 00:00:00 2001 From: sudoskys Date: Sat, 20 Apr 2024 18:28:14 +0800 Subject: [PATCH] :recycle: refactor: add global credential tool model in credential.py and update .env.exp --- .env.exp | 3 ++- app/components/credential.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.exp b/.env.exp index 794ec3c9f..bec91c210 100644 --- a/.env.exp +++ b/.env.exp @@ -1,6 +1,7 @@ # NOTE:If you want to share your bot to **everyone** # GLOBAL_OAI_KEY=sk-xxx -# GLOBAL_OAI_MODEL=gpt-3.5-turbo-0613 +GLOBAL_OAI_MODEL=gpt-3.5-turbo +GLOBAL_OAI_TOOL_MODEL=gpt-3.5-turbo # GLOBAL_OAI_ENDPOINT=https://api.openai.com/v1/ AMQP_DSN=amqp://admin:8a8a8a@localhost:5672/ diff --git a/app/components/credential.py b/app/components/credential.py index cd80e6d44..6296b2fd8 100644 --- a/app/components/credential.py +++ b/app/components/credential.py @@ -48,6 +48,7 @@ def from_provider(cls, token, provider_url): api_key=os.getenv("GLOBAL_OAI_KEY"), api_endpoint=os.getenv("GLOBAL_OAI_ENDPOINT"), api_model=os.getenv("GLOBAL_OAI_MODEL", "gpt-3.5-turbo"), + api_tool_model=os.getenv("GLOBAL_OAI_TOOL_MODEL", "gpt-3.5-turbo"), ) else: global_credential = None