Home / Function/ _get_chain_outputs() — langchain Function Reference

_get_chain_outputs() — langchain Function Reference

Architecture documentation for the _get_chain_outputs() function in core.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  e82c5a26_8297_ea3d_c722_4eda8dd165cc["_get_chain_outputs()"]
  70348e44_de0f_ccb4_c06a_8453289ed93e["_TracerCore"]
  e82c5a26_8297_ea3d_c722_4eda8dd165cc -->|defined in| 70348e44_de0f_ccb4_c06a_8453289ed93e
  c73f7f6a_96db_36a1_070c_9fc5d50d7bb6["_complete_chain_run()"]
  c73f7f6a_96db_36a1_070c_9fc5d50d7bb6 -->|calls| e82c5a26_8297_ea3d_c722_4eda8dd165cc
  style e82c5a26_8297_ea3d_c722_4eda8dd165cc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tracers/core.py lines 370–379

    def _get_chain_outputs(self, outputs: Any) -> Any:
        """Get the outputs for a chain run."""
        if self._schema_format in {"original", "original+chat"}:
            return outputs if isinstance(outputs, dict) else {"output": outputs}
        if self._schema_format == "streaming_events":
            return {
                "output": outputs,
            }
        msg = f"Invalid format: {self._schema_format}"
        raise ValueError(msg)

Domain

Subdomains

Frequently Asked Questions

What does _get_chain_outputs() do?
_get_chain_outputs() is a function in the langchain codebase, defined in libs/core/langchain_core/tracers/core.py.
Where is _get_chain_outputs() defined?
_get_chain_outputs() is defined in libs/core/langchain_core/tracers/core.py at line 370.
What calls _get_chain_outputs()?
_get_chain_outputs() is called by 1 function(s): _complete_chain_run.

Analyze Your Own Codebase

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

Try Supermodel Free