Feature: invoice ocr assistant

This commit is contained in:
Stitch-z 2023-10-10 14:26:03 +08:00
parent 443c044990
commit e3ecb88293
15 changed files with 598 additions and 4 deletions

View file

@ -195,7 +195,8 @@ class OutputParser:
except (ValueError, SyntaxError) as e:
raise Exception(f"Error while extracting and parsing the {data_type}: {e}")
else:
raise Exception(f"No {data_type} found in the text.")
logger.error(f"No {data_type} found in the text.")
return [] if data_type is list else {}
class CodeParser: