ai repsosne timeout increased to 180s
This commit is contained in:
@@ -252,7 +252,7 @@ class AICore:
|
||||
request_start = time.time()
|
||||
|
||||
try:
|
||||
response = requests.post(url, headers=headers, json=body_data, timeout=60)
|
||||
response = requests.post(url, headers=headers, json=body_data, timeout=180)
|
||||
request_duration = time.time() - request_start
|
||||
tracker.ai_call(f"Received response in {request_duration:.2f}s (status={response.status_code})")
|
||||
|
||||
@@ -351,8 +351,8 @@ class AICore:
|
||||
}
|
||||
|
||||
except requests.exceptions.Timeout:
|
||||
error_msg = 'Request timeout (60s exceeded)'
|
||||
tracker.timeout(60)
|
||||
error_msg = 'Request timeout (180s exceeded)'
|
||||
tracker.timeout(180)
|
||||
logger.error(error_msg)
|
||||
return {
|
||||
'content': None,
|
||||
|
||||
@@ -183,7 +183,7 @@ class AIProcessor:
|
||||
|
||||
try:
|
||||
logger.info(f"Calling OpenAI API: model={model}, prompt_length={len(prompt)}")
|
||||
response = requests.post(url, headers=headers, json=body_data, timeout=60)
|
||||
response = requests.post(url, headers=headers, json=body_data, timeout=180)
|
||||
|
||||
# Step 8: HTTP Response Validation
|
||||
step_start = time.time()
|
||||
|
||||
Reference in New Issue
Block a user