_aget_docs() — langchain Function Reference
Architecture documentation for the _aget_docs() function in retrieval.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a9a5b4e9_e1f3_681e_a5ee_75ece394ee79["_aget_docs()"] 76f853c5_b279_fd04_f253_b0c960712f80["RetrievalQAWithSourcesChain"] a9a5b4e9_e1f3_681e_a5ee_75ece394ee79 -->|defined in| 76f853c5_b279_fd04_f253_b0c960712f80 0afcca8a_ef8b_63ff_50cb_7330bdb61fee["_reduce_tokens_below_limit()"] a9a5b4e9_e1f3_681e_a5ee_75ece394ee79 -->|calls| 0afcca8a_ef8b_63ff_50cb_7330bdb61fee style a9a5b4e9_e1f3_681e_a5ee_75ece394ee79 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/chains/qa_with_sources/retrieval.py lines 59–70
async def _aget_docs(
self,
inputs: dict[str, Any],
*,
run_manager: AsyncCallbackManagerForChainRun,
) -> list[Document]:
question = inputs[self.question_key]
docs = await self.retriever.ainvoke(
question,
config={"callbacks": run_manager.get_child()},
)
return self._reduce_tokens_below_limit(docs)
Domain
Subdomains
Source
Frequently Asked Questions
What does _aget_docs() do?
_aget_docs() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/qa_with_sources/retrieval.py.
Where is _aget_docs() defined?
_aget_docs() is defined in libs/langchain/langchain_classic/chains/qa_with_sources/retrieval.py at line 59.
What does _aget_docs() call?
_aget_docs() calls 1 function(s): _reduce_tokens_below_limit.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free