test_openai_streaming_callback() — langchain Function Reference
Architecture documentation for the test_openai_streaming_callback() function in test_azure.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 3fdae8fb_48d9_ce28_2e56_67c045319225["test_openai_streaming_callback()"] 671a8443_e2a5_306f_ef66_28e322d543e3["test_azure.py"] 3fdae8fb_48d9_ce28_2e56_67c045319225 -->|defined in| 671a8443_e2a5_306f_ef66_28e322d543e3 1ce0e9ef_d8ac_68f0_c218_c1118f0ea69a["_get_llm()"] 3fdae8fb_48d9_ce28_2e56_67c045319225 -->|calls| 1ce0e9ef_d8ac_68f0_c218_c1118f0ea69a style 3fdae8fb_48d9_ce28_2e56_67c045319225 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/tests/integration_tests/llms/test_azure.py lines 149–161
def test_openai_streaming_callback() -> None:
"""Test that streaming correctly invokes on_llm_new_token callback."""
callback_handler = FakeCallbackHandler()
callback_manager = CallbackManager([callback_handler])
llm = _get_llm(
max_tokens=10,
streaming=True,
temperature=0,
callbacks=callback_manager,
verbose=True,
)
llm.invoke("Write me a sentence with 100 words.")
assert callback_handler.llm_streams < 15
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_openai_streaming_callback() do?
test_openai_streaming_callback() is a function in the langchain codebase, defined in libs/partners/openai/tests/integration_tests/llms/test_azure.py.
Where is test_openai_streaming_callback() defined?
test_openai_streaming_callback() is defined in libs/partners/openai/tests/integration_tests/llms/test_azure.py at line 149.
What does test_openai_streaming_callback() call?
test_openai_streaming_callback() calls 1 function(s): _get_llm.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free