Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/parxy_core/drivers/llmwhisperer.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,24 @@ def _handle(
details=wex.value,
) from wex

# Check if the whisper processing failed server-side.
# The client may return the response without raising an exception,
# but the extraction data will be missing.
status = res.get('status', '')
if (
status == 'failed'
or 'extraction' not in res
or 'result_text' not in res.get('extraction', {})
):
error_msg = res.get(
'message', 'Document processing failed on LLMWhisperer.'
)
raise ParsingException(
error_msg,
self.SERVICE_NAME,
details=res,
)

doc = llmwhisperer_to_parxy(res)
doc.filename = filename

Expand Down