Home / Function/ test_structured_output_old_model() — langchain Function Reference

test_structured_output_old_model() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  8c73fdda_21e9_1b15_2727_ee966732e8a0["test_structured_output_old_model()"]
  c0f70782_2552_3264_2ecc_ede3cff537f7["test_azure.py"]
  8c73fdda_21e9_1b15_2727_ee966732e8a0 -->|defined in| c0f70782_2552_3264_2ecc_ede3cff537f7
  style 8c73fdda_21e9_1b15_2727_ee966732e8a0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/openai/tests/unit_tests/chat_models/test_azure.py lines 70–86

def test_structured_output_old_model() -> None:
    class Output(TypedDict):
        """output."""

        foo: str

    with pytest.warns(match="Cannot use method='json_schema'"):
        llm = AzureChatOpenAI(  # type: ignore[call-arg]
            model="gpt-35-turbo",
            azure_deployment="35-turbo-dev",
            openai_api_version="2023-05-15",
            azure_endpoint="my-base-url",
        ).with_structured_output(Output)

    # assert tool calling was used instead of json_schema
    assert "tools" in llm.steps[0].kwargs  # type: ignore
    assert "response_format" not in llm.steps[0].kwargs  # type: ignore

Domain

Subdomains

Frequently Asked Questions

What does test_structured_output_old_model() do?
test_structured_output_old_model() is a function in the langchain codebase, defined in libs/partners/openai/tests/unit_tests/chat_models/test_azure.py.
Where is test_structured_output_old_model() defined?
test_structured_output_old_model() is defined in libs/partners/openai/tests/unit_tests/chat_models/test_azure.py at line 70.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free