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