hadadrjt commited on
Commit
725ff17
·
1 Parent(s): 7fd4a34

ai: Increase timeout.

Browse files
Files changed (1) hide show
  1. jarvis.py +1 -1
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=5)
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