Spaces:
sierrafr
/
Runtime error

hadadrjt commited on
Commit
22ad1c6
·
1 Parent(s): e864bae

ai: Raise max timeout limit.

Browse files
Files changed (1) hide show
  1. jarvis.py +1 -1
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 [0.5, 1]:
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: