Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

More specific wording

“Philip6003d98f3ae6
diff --git a/scripts/json_parser.py b/scripts/json_parser.py
index 90bf83db00..91e4e80fd3 100644
--- a/scripts/json_parser.py
+++ b/scripts/json_parser.py
@@ -52,7 +52,7 @@ def fix_json(json_str: str, schema: str, debug=False) -> str:
# Try to fix the JSON using gpt:
function_string = "def fix_json(json_str: str, schema:str=None) -> str:"
args = [json_str, schema]
- description_string = """This function takes a JSON string and ensures that it is parseable and fully compliant with the provided schema. If an object or field specified in the schema isn't contained within the correct JSON, it is omitted. The function also escapes any double quotes in the JSON string to ensure that it is valid. If the JSON string contains any None or NaN values, they are replaced with null before being parsed."""
+ description_string = """This function takes a JSON string and ensures that it is parseable and fully compliant with the provided schema. If an object or field specified in the schema isn't contained within the correct JSON, it is omitted. The function also escapes any double quotes within JSON string values to ensure that they are valid. If the JSON string contains any None or NaN values, they are replaced with null before being parsed."""
# If it doesn't already start with a "`", add one:
if not json_str.startswith("`"):