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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user