Browse Source

调整

d1
H Vs 3 weeks ago
parent
commit
a96155f7c4
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      app/endpoints/pipeline_endpoint.py

+ 5
- 1
app/endpoints/pipeline_endpoint.py View File

@@ -164,7 +164,11 @@ async def gpt_client_async(request, messages: list, wixd: str, friend_wxid: str)
try:
c = await request.app.state.gewe_service.get_wxchat_config_from_cache_async(wixd)
api_key = c.get('agentTokenId', "sk-jr69ONIehfGKe9JFphuNk4DU5Y5wooHKHhQv7oSnFzVbwCnW65fXO9kvH")
api_url = "http://106.15.182.218:3000/api/v1/chat/completions"
base_url="http://106.15.182.218:3000"
environment = os.environ.get('environment', 'default')
if environment != 'default':
base_url="http://172.19.42.59:3000"
api_url = f"{base_url}/api/v1/chat/completions"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {api_key}"


Loading…
Cancel
Save