Merged in bugfix/up-tokens-and-json-parse-logging (pull request #493)

Bugfix/up tokens and json parse logging

* Increase max_tokens limit for get_reimbursement_primary

* print entire problematic input in universal_json_load


Approved-by: Katon Minhas
This commit is contained in:
Alex Galarce
2025-04-25 21:34:51 +00:00
parent 4844dcfd50
commit 0939399f0e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -271,8 +271,8 @@ def universal_json_load(string_dict: str):
return json.loads(matched_str)
except json.JSONDecodeError as e:
print(f"Failed to parse JSON: {e}")
print(f"Problematic JSON string: {matched_str}")
print(f"Original string: {string_dict[:200]}{'...' if len(string_dict) > 200 else ''}") # Print first 200 chars
# print(f"Problematic JSON string: {matched_str}")
print(f"Original string: {string_dict}")
print(f"Traceback: {traceback.format_exc()}")
raise ValueError(f"JSON parsing failed: {e.msg} at position {e.pos}") from e
else: