parse() — langchain Function Reference
Architecture documentation for the parse() function in output_parser.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a7391953_9a9c_49a0_f325_c37255835024["parse()"] c80bcf01_deef_c746_2289_cf3c30f352fb["StructuredChatOutputParserWithRetries"] a7391953_9a9c_49a0_f325_c37255835024 -->|defined in| c80bcf01_deef_c746_2289_cf3c30f352fb 574abdbf_1008_8bfd_6fa6_4755d13af11e["parse()"] 574abdbf_1008_8bfd_6fa6_4755d13af11e -->|calls| a7391953_9a9c_49a0_f325_c37255835024 574abdbf_1008_8bfd_6fa6_4755d13af11e["parse()"] a7391953_9a9c_49a0_f325_c37255835024 -->|calls| 574abdbf_1008_8bfd_6fa6_4755d13af11e style a7391953_9a9c_49a0_f325_c37255835024 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/structured_chat/output_parser.py lines 75–82
def parse(self, text: str) -> AgentAction | AgentFinish:
try:
if self.output_fixing_parser is not None:
return self.output_fixing_parser.parse(text)
return self.base_parser.parse(text)
except Exception as e:
msg = f"Could not parse LLM output: {text}"
raise OutputParserException(msg) from e
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does parse() do?
parse() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/structured_chat/output_parser.py.
Where is parse() defined?
parse() is defined in libs/langchain/langchain_classic/agents/structured_chat/output_parser.py at line 75.
What does parse() call?
parse() calls 1 function(s): parse.
What calls parse()?
parse() is called by 1 function(s): parse.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free