Home / Function/ test_convert_to_openai_function_strict_required() — langchain Function Reference

test_convert_to_openai_function_strict_required() — langchain Function Reference

Architecture documentation for the test_convert_to_openai_function_strict_required() function in test_function_calling.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  f07557b8_2581_781d_9a13_90de1a17b752["test_convert_to_openai_function_strict_required()"]
  6f1e8e6f_d3f9_e590_b17e_1dc8afafdbe0["test_function_calling.py"]
  f07557b8_2581_781d_9a13_90de1a17b752 -->|defined in| 6f1e8e6f_d3f9_e590_b17e_1dc8afafdbe0
  style f07557b8_2581_781d_9a13_90de1a17b752 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/utils/test_function_calling.py lines 1161–1171

def test_convert_to_openai_function_strict_required() -> None:
    class MyModel(BaseModel):
        """Dummy schema."""

        arg1: int = Field(..., description="foo")
        arg2: str | None = Field(None, description="bar")

    expected = ["arg1", "arg2"]
    func = convert_to_openai_function(MyModel, strict=True)
    actual = func["parameters"]["required"]
    assert actual == expected

Domain

Subdomains

Frequently Asked Questions

What does test_convert_to_openai_function_strict_required() do?
test_convert_to_openai_function_strict_required() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/utils/test_function_calling.py.
Where is test_convert_to_openai_function_strict_required() defined?
test_convert_to_openai_function_strict_required() is defined in libs/core/tests/unit_tests/utils/test_function_calling.py at line 1161.

Analyze Your Own Codebase

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

Try Supermodel Free