_documents_in_params() — langchain Function Reference
Architecture documentation for the _documents_in_params() function in chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 56815eb0_82df_1181_dbf9_0d0e97e40514["_documents_in_params()"] a85819c7_917d_4c71_2864_a19e68947340["chat_models.py"] 56815eb0_82df_1181_dbf9_0d0e97e40514 -->|defined in| a85819c7_917d_4c71_2864_a19e68947340 d6746b81_ab7c_4b02_8921_f885e52e303e["_stream()"] d6746b81_ab7c_4b02_8921_f885e52e303e -->|calls| 56815eb0_82df_1181_dbf9_0d0e97e40514 8028f890_4975_51cc_2409_45db9b39971a["_astream()"] 8028f890_4975_51cc_2409_45db9b39971a -->|calls| 56815eb0_82df_1181_dbf9_0d0e97e40514 style 56815eb0_82df_1181_dbf9_0d0e97e40514 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/langchain_anthropic/chat_models.py lines 1864–1874
def _documents_in_params(params: dict) -> bool:
for message in params.get("messages", []):
if isinstance(message.get("content"), list):
for block in message["content"]:
if (
isinstance(block, dict)
and block.get("type") == "document"
and block.get("citations", {}).get("enabled")
):
return True
return False
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _documents_in_params() do?
_documents_in_params() is a function in the langchain codebase, defined in libs/partners/anthropic/langchain_anthropic/chat_models.py.
Where is _documents_in_params() defined?
_documents_in_params() is defined in libs/partners/anthropic/langchain_anthropic/chat_models.py at line 1864.
What calls _documents_in_params()?
_documents_in_params() is called by 2 function(s): _astream, _stream.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free