Home / Function/ get_output_schema() — langchain Function Reference

get_output_schema() — langchain Function Reference

Architecture documentation for the get_output_schema() function in map_reduce.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  af04a2b3_d0b7_225b_b9a9_a52b93cf6c8c["get_output_schema()"]
  a22a5836_e793_27ca_7ffe_21cb92057ad5["MapReduceDocumentsChain"]
  af04a2b3_d0b7_225b_b9a9_a52b93cf6c8c -->|defined in| a22a5836_e793_27ca_7ffe_21cb92057ad5
  style af04a2b3_d0b7_225b_b9a9_a52b93cf6c8c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chains/combine_documents/map_reduce.py lines 111–124

    def get_output_schema(
        self,
        config: RunnableConfig | None = None,
    ) -> type[BaseModel]:
        if self.return_intermediate_steps:
            return create_model(
                "MapReduceDocumentsOutput",
                **{
                    self.output_key: (str, None),
                    "intermediate_steps": (list[str], None),
                },
            )

        return super().get_output_schema(config)

Subdomains

Frequently Asked Questions

What does get_output_schema() do?
get_output_schema() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/combine_documents/map_reduce.py.
Where is get_output_schema() defined?
get_output_schema() is defined in libs/langchain/langchain_classic/chains/combine_documents/map_reduce.py at line 111.

Analyze Your Own Codebase

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

Try Supermodel Free