test_chat_openai_multiple_completions() — langchain Function Reference
Architecture documentation for the test_chat_openai_multiple_completions() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 25b296b5_0e60_5db9_8946_dacba402295d["test_chat_openai_multiple_completions()"] bd382a4e_442c_13ae_530c_6e34bc43623d["test_base.py"] 25b296b5_0e60_5db9_8946_dacba402295d -->|defined in| bd382a4e_442c_13ae_530c_6e34bc43623d style 25b296b5_0e60_5db9_8946_dacba402295d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/tests/integration_tests/chat_models/test_base.py lines 144–153
def test_chat_openai_multiple_completions() -> None:
"""Test ChatOpenAI wrapper with multiple completions."""
chat = ChatOpenAI(max_tokens=MAX_TOKEN_COUNT, n=5) # type: ignore[call-arg]
message = HumanMessage(content="Hello")
response = chat._generate([message])
assert isinstance(response, ChatResult)
assert len(response.generations) == 5
for generation in response.generations:
assert isinstance(generation.message, BaseMessage)
assert isinstance(generation.message.content, str)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_chat_openai_multiple_completions() do?
test_chat_openai_multiple_completions() is a function in the langchain codebase, defined in libs/partners/openai/tests/integration_tests/chat_models/test_base.py.
Where is test_chat_openai_multiple_completions() defined?
test_chat_openai_multiple_completions() is defined in libs/partners/openai/tests/integration_tests/chat_models/test_base.py at line 144.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free