ai: Raise max timeout limit.
Browse files
jarvis.py
CHANGED
@@ -202,7 +202,7 @@ def extract_file_content(fp):
|
|
202 |
return f"{fp}: {e}"
|
203 |
|
204 |
async def fetch_response_stream_async(host, key, model, msgs, cfg, sid, stop_event, cancel_token):
|
205 |
-
for t in [
|
206 |
try:
|
207 |
async with httpx.AsyncClient(timeout=t) as client:
|
208 |
async with client.stream("POST", host, json={**{"model": model, "messages": msgs, "session_id": sid, "stream": True}, **cfg}, headers={"Authorization": f"Bearer {key}"}) as response:
|
|
|
202 |
return f"{fp}: {e}"
|
203 |
|
204 |
async def fetch_response_stream_async(host, key, model, msgs, cfg, sid, stop_event, cancel_token):
|
205 |
+
for t in [5, 10]:
|
206 |
try:
|
207 |
async with httpx.AsyncClient(timeout=t) as client:
|
208 |
async with client.stream("POST", host, json={**{"model": model, "messages": msgs, "session_id": sid, "stream": True}, **cfg}, headers={"Authorization": f"Bearer {key}"}) as response:
|