logging
This commit is contained in:
parent
982726d904
commit
73f039afb5
1 changed files with 30 additions and 23 deletions
|
|
@ -189,6 +189,7 @@ async def async_response(
|
||||||
previous_response_id: str = None,
|
previous_response_id: str = None,
|
||||||
log_prefix: str = "response",
|
log_prefix: str = "response",
|
||||||
):
|
):
|
||||||
|
try:
|
||||||
logger.info("User prompt received", prompt=prompt)
|
logger.info("User prompt received", prompt=prompt)
|
||||||
|
|
||||||
# Build request parameters
|
# Build request parameters
|
||||||
|
|
@ -218,6 +219,12 @@ async def async_response(
|
||||||
)
|
)
|
||||||
|
|
||||||
return response_text, response_id, response
|
return response_text, response_id, response
|
||||||
|
except Exception as e:
|
||||||
|
logger.error("Exception in non-streaming response", error=str(e))
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
traceback.print_exc()
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
# Unified streaming function for both chat and langflow
|
# Unified streaming function for both chat and langflow
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue