Home / Function/ aparse_result() — langchain Function Reference

aparse_result() — langchain Function Reference

Architecture documentation for the aparse_result() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  53fea0b3_4f55_8510_36c1_454d0cb3b668["aparse_result()"]
  e155cd04_a39d_263a_c7f3_32e5830d204b["BaseOutputParser"]
  53fea0b3_4f55_8510_36c1_454d0cb3b668 -->|defined in| e155cd04_a39d_263a_c7f3_32e5830d204b
  2be265b1_8102_c927_29aa_00e92f4c1e3f["aparse_result()"]
  2be265b1_8102_c927_29aa_00e92f4c1e3f -->|calls| 53fea0b3_4f55_8510_36c1_454d0cb3b668
  cb9da95c_c554_d516_01c0_846b88d55bec["ainvoke()"]
  cb9da95c_c554_d516_01c0_846b88d55bec -->|calls| 53fea0b3_4f55_8510_36c1_454d0cb3b668
  2be265b1_8102_c927_29aa_00e92f4c1e3f["aparse_result()"]
  53fea0b3_4f55_8510_36c1_454d0cb3b668 -->|calls| 2be265b1_8102_c927_29aa_00e92f4c1e3f
  style 53fea0b3_4f55_8510_36c1_454d0cb3b668 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/output_parsers/base.py lines 277–297

    async def aparse_result(
        self, result: list[Generation], *, partial: bool = False
    ) -> T:
        """Parse a list of candidate model `Generation` objects into a specific format.

        The return value is parsed from only the first `Generation` in the result, which
        is assumed to be the highest-likelihood `Generation`.

        Args:
            result: A list of `Generation` to be parsed.

                The `Generation` objects are assumed to be different candidate outputs
                for a single model input.
            partial: Whether to parse the output as a partial result.

                This is useful for parsers that can parse partial results.

        Returns:
            Structured output.
        """
        return await run_in_executor(None, self.parse_result, result, partial=partial)

Domain

Subdomains

Frequently Asked Questions

What does aparse_result() do?
aparse_result() is a function in the langchain codebase, defined in libs/core/langchain_core/output_parsers/base.py.
Where is aparse_result() defined?
aparse_result() is defined in libs/core/langchain_core/output_parsers/base.py at line 277.
What does aparse_result() call?
aparse_result() calls 1 function(s): aparse_result.
What calls aparse_result()?
aparse_result() is called by 2 function(s): ainvoke, aparse_result.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free