mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-30 09:28:19 -05:00
fix(json_parser): fixing the "TypeError('the JSON object must be str, bytes or bytearray, not dict')" after a json_fix is successful
This commit is contained in:
@@ -67,7 +67,8 @@ def fix_json(json_str: str, schema: str, debug=False) -> str:
|
||||
print(f"Fixed JSON: {result_string}")
|
||||
print("----------- END OF FIX ATTEMPT ----------------")
|
||||
try:
|
||||
return json.loads(result_string)
|
||||
json.loads(result_string) # just check the validity
|
||||
return result_string
|
||||
except:
|
||||
# Get the call stack:
|
||||
# import traceback
|
||||
|
||||
Reference in New Issue
Block a user