LangChain · Class
PydanticOutputParser
PydanticOutputParser converts language model JSON output into a validated Pydantic object. It also supports parsing generated candidates and partial results.
Last updated
- Since
- v1.7
Syntax
PydanticOutputParser(self, args: Any = (), kwargs: Any = {})
parse(self, text: str) -> TBaseModel
parse_result(self, result: list[Generation], *, partial: bool = False) -> TBaseModel | NoneIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
JsonOutputParserGenerationBaseOutputParserparse_with_promptaparseaparse_result