mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-26 16:43:35 +00:00
Update json.py
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
This commit is contained in:
parent
aa8b4120a8
commit
cbe18057b0
@ -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…
Reference in New Issue
Block a user