Home / Function/ test_convert_to_openai_function_nested_v2() — langchain Function Reference

test_convert_to_openai_function_nested_v2() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/utils/test_function_calling.py lines 410–420

def test_convert_to_openai_function_nested_v2() -> None:
    class NestedV2(BaseModelV2Maybe):
        nested_v2_arg1: int = FieldV2Maybe(..., description="foo")
        nested_v2_arg2: Literal["bar", "baz"] = FieldV2Maybe(
            ..., description="one of 'bar', 'baz'"
        )

    def my_function(arg1: NestedV2) -> None:
        """Dummy function."""

    convert_to_openai_function(my_function)

Domain

Subdomains

Frequently Asked Questions

What does test_convert_to_openai_function_nested_v2() do?
test_convert_to_openai_function_nested_v2() 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_nested_v2() defined?
test_convert_to_openai_function_nested_v2() is defined in libs/core/tests/unit_tests/utils/test_function_calling.py at line 410.

Analyze Your Own Codebase

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

Try Supermodel Free