fix typo in json_parser.py

specifed -> specified
This commit is contained in:
Ikko Eltociear Ashimine
2023-04-07 17:25:22 +09:00
committed by GitHub
parent c6d90227fe
commit c1034df2d3

View File

@@ -53,7 +53,7 @@ def fix_json(json_str: str, schema: str, debug=False) -> str:
# Try to fix the JSON using gpt: # Try to fix the JSON using gpt:
function_string = "def fix_json(json_str: str, schema:str=None) -> str:" function_string = "def fix_json(json_str: str, schema:str=None) -> str:"
args = [f"'''{json_str}'''", f"'''{schema}'''"] args = [f"'''{json_str}'''", f"'''{schema}'''"]
description_string = """Fixes the provided JSON string to make it parseable and fully complient with the provided schema.\n If an object or field specifed in the schema isn't contained within the correct JSON, it is ommited.\n This function is brilliant at guessing when the format is incorrect.""" description_string = """Fixes the provided JSON string to make it parseable and fully complient with the provided schema.\n If an object or field specified in the schema isn't contained within the correct JSON, it is ommited.\n This function is brilliant at guessing when the format is incorrect."""
# If it doesn't already start with a "`", add one: # If it doesn't already start with a "`", add one:
if not json_str.startswith("`"): if not json_str.startswith("`"):