We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6182cd7 commit df5012aCopy full SHA for df5012a
src/app/endpoints/query.py
@@ -492,8 +492,11 @@ async def retrieve_response( # pylint: disable=too-many-locals
492
# Metric for LLM validation errors
493
metrics.llm_calls_validation_errors_total.inc()
494
break
495
+ if response is not None and response.output_message is not None: # type: ignore[union-attr]
496
+ return str(response.output_message.content), conversation_id # type: ignore[union-attr]
497
- return str(response.output_message.content), conversation_id # type: ignore[union-attr]
498
+ logger.warning("Response does not contain any message to be returned")
499
+ return "", conversation_id # fallback
500
501
502
def validate_attachments_metadata(attachments: list[Attachment]) -> None:
0 commit comments