mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01: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