Spaces:
Running
Running
ai: Increase timeout.
Browse files
jarvis.py
CHANGED
@@ -108,7 +108,7 @@ def chat_with_model(history, user_input, selected_model_display, sess):
|
|
108 |
for api_key in LINUX_SERVER_PROVIDER_KEYS:
|
109 |
for host in LINUX_SERVER_HOSTS:
|
110 |
try:
|
111 |
-
response = sess.post(host, json=data, headers={"Authorization": f"Bearer {api_key}"}, timeout=
|
112 |
if response.status_code < 400:
|
113 |
ai_text = response.json().get("choices", [{}])[0].get("message", {}).get("content", RESPONSES["RESPONSE_2"])
|
114 |
return ai_text
|
|
|
108 |
for api_key in LINUX_SERVER_PROVIDER_KEYS:
|
109 |
for host in LINUX_SERVER_HOSTS:
|
110 |
try:
|
111 |
+
response = sess.post(host, json=data, headers={"Authorization": f"Bearer {api_key}"}, timeout=1)
|
112 |
if response.status_code < 400:
|
113 |
ai_text = response.json().get("choices", [{}])[0].get("message", {}).get("content", RESPONSES["RESPONSE_2"])
|
114 |
return ai_text
|