test_async_response_metadata() — langchain Function Reference
Architecture documentation for the test_async_response_metadata() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 4a85403e_6d24_e21d_3dc1_c362a32d7800["test_async_response_metadata()"] bd382a4e_442c_13ae_530c_6e34bc43623d["test_base.py"] 4a85403e_6d24_e21d_3dc1_c362a32d7800 -->|defined in| bd382a4e_442c_13ae_530c_6e34bc43623d style 4a85403e_6d24_e21d_3dc1_c362a32d7800 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/tests/integration_tests/chat_models/test_base.py lines 445–460
async def test_async_response_metadata() -> None:
llm = ChatOpenAI()
result = await llm.ainvoke([HumanMessage(content="I'm PickleRick")], logprobs=True)
assert result.response_metadata
assert all(
k in result.response_metadata
for k in (
"token_usage",
"model_name",
"logprobs",
"system_fingerprint",
"finish_reason",
"service_tier",
)
)
assert "content" in result.response_metadata["logprobs"]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_async_response_metadata() do?
test_async_response_metadata() is a function in the langchain codebase, defined in libs/partners/openai/tests/integration_tests/chat_models/test_base.py.
Where is test_async_response_metadata() defined?
test_async_response_metadata() is defined in libs/partners/openai/tests/integration_tests/chat_models/test_base.py at line 445.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free