Home / Function/ test_async_chat_openai() — langchain Function Reference

test_async_chat_openai() — langchain Function Reference

Architecture documentation for the test_async_chat_openai() function in test_azure.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  5320ed4f_4f10_b82c_ca4f_a07204e7a212["test_async_chat_openai()"]
  c413d48d_e43d_eae6_47cb_3eea9394c77c["test_azure.py"]
  5320ed4f_4f10_b82c_ca4f_a07204e7a212 -->|defined in| c413d48d_e43d_eae6_47cb_3eea9394c77c
  ccf90d51_5ff2_7b50_5922_b28b80cca584["_get_llm()"]
  5320ed4f_4f10_b82c_ca4f_a07204e7a212 -->|calls| ccf90d51_5ff2_7b50_5922_b28b80cca584
  style 5320ed4f_4f10_b82c_ca4f_a07204e7a212 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/openai/tests/integration_tests/chat_models/test_azure.py lines 124–136

async def test_async_chat_openai() -> None:
    """Test async generation."""
    chat = _get_llm(max_tokens=10, n=2)
    message = HumanMessage(content="Hello")
    response = await chat.agenerate([[message], [message]])
    assert isinstance(response, LLMResult)
    assert len(response.generations) == 2
    for generations in response.generations:
        assert len(generations) == 2
        for generation in generations:
            assert isinstance(generation, ChatGeneration)
            assert isinstance(generation.text, str)
            assert generation.text == generation.message.content

Domain

Subdomains

Calls

Frequently Asked Questions

What does test_async_chat_openai() do?
test_async_chat_openai() is a function in the langchain codebase, defined in libs/partners/openai/tests/integration_tests/chat_models/test_azure.py.
Where is test_async_chat_openai() defined?
test_async_chat_openai() is defined in libs/partners/openai/tests/integration_tests/chat_models/test_azure.py at line 124.
What does test_async_chat_openai() call?
test_async_chat_openai() 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