test_openai_stop_valid() — langchain Function Reference
Architecture documentation for the test_openai_stop_valid() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a4c8c53c_fb9a_63b4_9fc6_991a2ac4390b["test_openai_stop_valid()"] 2edc9f83_2189_a9c8_70f5_10e2e98e8272["test_base.py"] a4c8c53c_fb9a_63b4_9fc6_991a2ac4390b -->|defined in| 2edc9f83_2189_a9c8_70f5_10e2e98e8272 style a4c8c53c_fb9a_63b4_9fc6_991a2ac4390b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/tests/integration_tests/llms/test_base.py lines 90–98
def test_openai_stop_valid() -> None:
"""Test openai stop logic on valid configuration."""
query = "write an ordered list of five items"
first_llm = OpenAI(stop="3", temperature=0) # type: ignore[call-arg]
first_output = first_llm.invoke(query)
second_llm = OpenAI(temperature=0)
second_output = second_llm.invoke(query, stop=["3"])
# Because it stops on new lines, shouldn't return anything
assert first_output == second_output
Domain
Subdomains
Source
Frequently Asked Questions
What does test_openai_stop_valid() do?
test_openai_stop_valid() is a function in the langchain codebase, defined in libs/partners/openai/tests/integration_tests/llms/test_base.py.
Where is test_openai_stop_valid() defined?
test_openai_stop_valid() is defined in libs/partners/openai/tests/integration_tests/llms/test_base.py at line 90.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free