Home / Function/ _call() — langchain Function Reference

_call() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  2935460b_bf17_a686_f1f0_6e58ef3057d8["_call()"]
  6967363b_5687_0df1_ea75_11e5aee145da["AnalyzeDocumentChain"]
  2935460b_bf17_a686_f1f0_6e58ef3057d8 -->|defined in| 6967363b_5687_0df1_ea75_11e5aee145da
  971650f7_5caa_f9b1_7442_8ddd96c90943["_call()"]
  971650f7_5caa_f9b1_7442_8ddd96c90943 -->|calls| 2935460b_bf17_a686_f1f0_6e58ef3057d8
  971650f7_5caa_f9b1_7442_8ddd96c90943["_call()"]
  2935460b_bf17_a686_f1f0_6e58ef3057d8 -->|calls| 971650f7_5caa_f9b1_7442_8ddd96c90943
  style 2935460b_bf17_a686_f1f0_6e58ef3057d8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chains/combine_documents/base.py lines 262–278

    def _call(
        self,
        inputs: dict[str, str],
        run_manager: CallbackManagerForChainRun | None = None,
    ) -> dict[str, str]:
        """Split document into chunks and pass to CombineDocumentsChain."""
        _run_manager = run_manager or CallbackManagerForChainRun.get_noop_manager()
        document = inputs[self.input_key]
        docs = self.text_splitter.create_documents([document])
        # Other keys are assumed to be needed for LLM prediction
        other_keys: dict = {k: v for k, v in inputs.items() if k != self.input_key}
        other_keys[self.combine_docs_chain.input_key] = docs
        return self.combine_docs_chain(
            other_keys,
            return_only_outputs=True,
            callbacks=_run_manager.get_child(),
        )

Subdomains

Calls

Called By

Frequently Asked Questions

What does _call() do?
_call() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/combine_documents/base.py.
Where is _call() defined?
_call() is defined in libs/langchain/langchain_classic/chains/combine_documents/base.py at line 262.
What does _call() call?
_call() calls 1 function(s): _call.
What calls _call()?
_call() is called by 1 function(s): _call.

Analyze Your Own Codebase

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

Try Supermodel Free