Update json.py

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
pull/11193/head
Nuno Campos 1 year ago committed by GitHub
parent aa8b4120a8
commit cbe18057b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -179,7 +179,7 @@ class SimpleJsonOutputParser(BaseCumulativeTransformOutputParser[Any]):
def parse(self, text: str) -> Any:
text = text.strip()
try:
return parse_json_markdown(text.strip(), parse_partial_json)
return parse_json_markdown(text.strip(), parser=parse_partial_json)
except JSONDecodeError as e:
raise OutputParserException(f"Invalid json output: {text}") from e

Loading…
Cancel
Save