mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
Fix flake8 W293 and W391
This commit is contained in:
@@ -71,11 +71,11 @@ def fix_and_parse_json(
|
||||
return json_str
|
||||
else:
|
||||
raise e
|
||||
|
||||
|
||||
|
||||
|
||||
def fix_json(json_str: str, schema: str) -> str:
|
||||
"""Fix the given JSON string to make it parseable and fully complient with the provided schema."""
|
||||
|
||||
|
||||
# Try to fix the JSON using gpt:
|
||||
function_string = "def fix_json(json_str: str, schema:str=None) -> str:"
|
||||
args = [f"'''{json_str}'''", f"'''{schema}'''"]
|
||||
|
||||
Reference in New Issue
Block a user