Home / Function/ _aget_docs() — langchain Function Reference

_aget_docs() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  a4ebed9c_c61f_770b_661e_da8b990ad251["_aget_docs()"]
  1c559a69_197e_d647_5f47_79dc8fa4a648["ConversationalRetrievalChain"]
  a4ebed9c_c61f_770b_661e_da8b990ad251 -->|defined in| 1c559a69_197e_d647_5f47_79dc8fa4a648
  80d8511e_e74f_2e34_6d79_70d274ac463d["_aget_docs()"]
  80d8511e_e74f_2e34_6d79_70d274ac463d -->|calls| a4ebed9c_c61f_770b_661e_da8b990ad251
  b128053c_ae67_13fa_39d2_7ed6b1273cf8["_acall()"]
  b128053c_ae67_13fa_39d2_7ed6b1273cf8 -->|calls| a4ebed9c_c61f_770b_661e_da8b990ad251
  0ec6d3c8_c314_4625_083f_9ddc0dfb409c["_reduce_tokens_below_limit()"]
  a4ebed9c_c61f_770b_661e_da8b990ad251 -->|calls| 0ec6d3c8_c314_4625_083f_9ddc0dfb409c
  80d8511e_e74f_2e34_6d79_70d274ac463d["_aget_docs()"]
  a4ebed9c_c61f_770b_661e_da8b990ad251 -->|calls| 80d8511e_e74f_2e34_6d79_70d274ac463d
  style a4ebed9c_c61f_770b_661e_da8b990ad251 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chains/conversational_retrieval/base.py lines 423–435

    async def _aget_docs(
        self,
        question: str,
        inputs: dict[str, Any],
        *,
        run_manager: AsyncCallbackManagerForChainRun,
    ) -> list[Document]:
        """Get docs."""
        docs = await self.retriever.ainvoke(
            question,
            config={"callbacks": run_manager.get_child()},
        )
        return self._reduce_tokens_below_limit(docs)

Subdomains

Frequently Asked Questions

What does _aget_docs() do?
_aget_docs() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/conversational_retrieval/base.py.
Where is _aget_docs() defined?
_aget_docs() is defined in libs/langchain/langchain_classic/chains/conversational_retrieval/base.py at line 423.
What does _aget_docs() call?
_aget_docs() calls 2 function(s): _aget_docs, _reduce_tokens_below_limit.
What calls _aget_docs()?
_aget_docs() is called by 2 function(s): _acall, _aget_docs.

Analyze Your Own Codebase

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

Try Supermodel Free