Home / Function/ test_convert_to_openai_function_no_description() — langchain Function Reference

test_convert_to_openai_function_no_description() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/utils/test_function_calling.py lines 644–661

def test_convert_to_openai_function_no_description(func: dict) -> None:
    expected = {
        "name": "dummy_function",
        "parameters": {
            "type": "object",
            "properties": {
                "arg1": {"description": "foo", "type": "integer"},
                "arg2": {
                    "description": "one of 'bar', 'baz'",
                    "enum": ["bar", "baz"],
                    "type": "string",
                },
            },
            "required": ["arg1", "arg2"],
        },
    }
    actual = convert_to_openai_function(func)
    assert actual == expected

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free