Spaces:
Building
Building
Update chat_handler.py
Browse files- chat_handler.py +3 -3
chat_handler.py
CHANGED
@@ -327,7 +327,7 @@ async def _execute_api_call(session: Session, intent_config) -> str:
|
|
327 |
|
328 |
if not api_config:
|
329 |
session.reset_flow()
|
330 |
-
return intent_config.
|
331 |
|
332 |
log(f"📡 Calling API: {api_name}")
|
333 |
|
@@ -351,8 +351,8 @@ async def _execute_api_call(session: Session, intent_config) -> str:
|
|
351 |
|
352 |
except requests.exceptions.Timeout:
|
353 |
session.reset_flow()
|
354 |
-
return intent_config.
|
355 |
except Exception as e:
|
356 |
log(f"❌ API call error: {e}")
|
357 |
session.reset_flow()
|
358 |
-
return intent_config.
|
|
|
327 |
|
328 |
if not api_config:
|
329 |
session.reset_flow()
|
330 |
+
return intent_config.fallback_error_prompt or "İşlem başarısız oldu."
|
331 |
|
332 |
log(f"📡 Calling API: {api_name}")
|
333 |
|
|
|
351 |
|
352 |
except requests.exceptions.Timeout:
|
353 |
session.reset_flow()
|
354 |
+
return intent_config.fallback_timeout_prompt or "İşlem zaman aşımına uğradı."
|
355 |
except Exception as e:
|
356 |
log(f"❌ API call error: {e}")
|
357 |
session.reset_flow()
|
358 |
+
return intent_config.fallback_error_prompt or "İşlem sırasında bir hata oluştu."
|