parse_result() — langchain Function Reference
Architecture documentation for the parse_result() function in output_parsers.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9a2ae530_422d_2fd8_fa7d_2515e0623c7c["parse_result()"] c9e9354f_7b48_d8bc_644d_55a2eb9990f7["ReasoningStructuredOutputParser"] 9a2ae530_422d_2fd8_fa7d_2515e0623c7c -->|defined in| c9e9354f_7b48_d8bc_644d_55a2eb9990f7 226e3323_bb76_2676_e692_4e21f7ba7236["parse_result()"] 226e3323_bb76_2676_e692_4e21f7ba7236 -->|calls| 9a2ae530_422d_2fd8_fa7d_2515e0623c7c 226e3323_bb76_2676_e692_4e21f7ba7236["parse_result()"] 9a2ae530_422d_2fd8_fa7d_2515e0623c7c -->|calls| 226e3323_bb76_2676_e692_4e21f7ba7236 b2204b0d_d186_cc64_ba3a_c35b30d16454["strip_think_tags()"] 9a2ae530_422d_2fd8_fa7d_2515e0623c7c -->|calls| b2204b0d_d186_cc64_ba3a_c35b30d16454 style 9a2ae530_422d_2fd8_fa7d_2515e0623c7c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/perplexity/langchain_perplexity/output_parsers.py lines 76–88
def parse_result(self, result: list[Generation], *, partial: bool = False) -> Any:
"""Parse the result of an LLM call to a Pydantic object.
Args:
result: The result of the LLM call.
partial: Whether to parse partial JSON objects.
If `True`, the output will be a JSON object containing
all the keys that have been returned so far.
If `False`, the output will be the full JSON object.
"""
text = result[0].text
text = strip_think_tags(text)
return super().parse_result([Generation(text=text)], partial=partial)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does parse_result() do?
parse_result() is a function in the langchain codebase, defined in libs/partners/perplexity/langchain_perplexity/output_parsers.py.
Where is parse_result() defined?
parse_result() is defined in libs/partners/perplexity/langchain_perplexity/output_parsers.py at line 76.
What does parse_result() call?
parse_result() calls 2 function(s): parse_result, strip_think_tags.
What calls parse_result()?
parse_result() is called by 1 function(s): parse_result.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free