Home / Function/ acombine_docs() — langchain Function Reference

acombine_docs() — langchain Function Reference

Architecture documentation for the acombine_docs() function in stuff.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ee1c7e93_6132_f120_3775_2b63f3575677["acombine_docs()"]
  2d0480d1_fbf6_c0df_d443_92c8437d1fff["StuffDocumentsChain"]
  ee1c7e93_6132_f120_3775_2b63f3575677 -->|defined in| 2d0480d1_fbf6_c0df_d443_92c8437d1fff
  e7742348_cc60_c503_d46b_e83cb5c9de9a["_get_inputs()"]
  ee1c7e93_6132_f120_3775_2b63f3575677 -->|calls| e7742348_cc60_c503_d46b_e83cb5c9de9a
  style ee1c7e93_6132_f120_3775_2b63f3575677 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chains/combine_documents/stuff.py lines 268–287

    async def acombine_docs(
        self,
        docs: list[Document],
        callbacks: Callbacks = None,
        **kwargs: Any,
    ) -> tuple[str, dict]:
        """Async stuff all documents into one prompt and pass to LLM.

        Args:
            docs: List of documents to join together into one variable
            callbacks: Optional callbacks to pass along
            **kwargs: additional parameters to use to get inputs to LLMChain.

        Returns:
            The first element returned is the single string output. The second
            element returned is a dictionary of other keys to return.
        """
        inputs = self._get_inputs(docs, **kwargs)
        # Call predict on the LLM.
        return await self.llm_chain.apredict(callbacks=callbacks, **inputs), {}

Subdomains

Frequently Asked Questions

What does acombine_docs() do?
acombine_docs() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/combine_documents/stuff.py.
Where is acombine_docs() defined?
acombine_docs() is defined in libs/langchain/langchain_classic/chains/combine_documents/stuff.py at line 268.
What does acombine_docs() call?
acombine_docs() calls 1 function(s): _get_inputs.

Analyze Your Own Codebase

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

Try Supermodel Free