Spaces:
Running
Running
ai: Increase timeout (again).
Browse files
jarvis.py
CHANGED
@@ -147,7 +147,7 @@ def process_ai_response(ai_text):
|
|
147 |
|
148 |
async def fetch_response_async(host, provider_key, selected_model, messages, model_config, session_id):
|
149 |
try:
|
150 |
-
async with httpx.AsyncClient(timeout=
|
151 |
data = {"model": selected_model, "messages": messages, **model_config}
|
152 |
extra = {"optillm_approach": "rto|re2|cot_reflection|self_consistency|plansearch|leap|z3|bon|moa|mcts|mcp|router|privacy|executecode|json", "session_id": session_id}
|
153 |
response = await client.post(f"{host}", json={**data, "extra_body": extra, "session_id": session_id}, headers={"Authorization": f"Bearer {provider_key}"})
|
|
|
147 |
|
148 |
async def fetch_response_async(host, provider_key, selected_model, messages, model_config, session_id):
|
149 |
try:
|
150 |
+
async with httpx.AsyncClient(timeout=5) as client:
|
151 |
data = {"model": selected_model, "messages": messages, **model_config}
|
152 |
extra = {"optillm_approach": "rto|re2|cot_reflection|self_consistency|plansearch|leap|z3|bon|moa|mcts|mcp|router|privacy|executecode|json", "session_id": session_id}
|
153 |
response = await client.post(f"{host}", json={**data, "extra_body": extra, "session_id": session_id}, headers={"Authorization": f"Bearer {provider_key}"})
|