test_anthropic_async_streaming_callback() — langchain Function Reference
Architecture documentation for the test_anthropic_async_streaming_callback() function in test_llms.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD d3665575_744b_e451_8e41_44fe4229a857["test_anthropic_async_streaming_callback()"] c4009766_f7e3_5acb_b9c7_0d2d714545e2["test_llms.py"] d3665575_744b_e451_8e41_44fe4229a857 -->|defined in| c4009766_f7e3_5acb_b9c7_0d2d714545e2 style d3665575_744b_e451_8e41_44fe4229a857 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/tests/integration_tests/test_llms.py lines 66–78
async def test_anthropic_async_streaming_callback() -> None:
"""Test that streaming correctly invokes on_llm_new_token callback."""
callback_handler = FakeCallbackHandler()
callback_manager = CallbackManager([callback_handler])
llm = AnthropicLLM(
model=MODEL, # type: ignore[call-arg]
streaming=True,
callbacks=callback_manager,
verbose=True,
)
result = await llm.agenerate(["How many toes do dogs have?"])
assert callback_handler.llm_streams > 1
assert isinstance(result, LLMResult)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_anthropic_async_streaming_callback() do?
test_anthropic_async_streaming_callback() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/integration_tests/test_llms.py.
Where is test_anthropic_async_streaming_callback() defined?
test_anthropic_async_streaming_callback() is defined in libs/partners/anthropic/tests/integration_tests/test_llms.py at line 66.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free