Home / Function/ _convert_typed_dict_to_openai_function() — langchain Function Reference

_convert_typed_dict_to_openai_function() — langchain Function Reference

Architecture documentation for the _convert_typed_dict_to_openai_function() function in function_calling.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  d00def25_dca2_e600_04f5_851128959741["_convert_typed_dict_to_openai_function()"]
  14ab3d97_532b_bb37_6d2f_7248501f1cb8["function_calling.py"]
  d00def25_dca2_e600_04f5_851128959741 -->|defined in| 14ab3d97_532b_bb37_6d2f_7248501f1cb8
  0f5a84d8_de71_8584_be44_11eb4638cb79["convert_to_openai_function()"]
  0f5a84d8_de71_8584_be44_11eb4638cb79 -->|calls| d00def25_dca2_e600_04f5_851128959741
  2a5add10_8549_64cb_bed6_4a2a252534e4["_convert_any_typed_dicts_to_pydantic()"]
  d00def25_dca2_e600_04f5_851128959741 -->|calls| 2a5add10_8549_64cb_bed6_4a2a252534e4
  730ff227_fb8d_905a_795b_7b8c5620289e["_convert_pydantic_to_openai_function()"]
  d00def25_dca2_e600_04f5_851128959741 -->|calls| 730ff227_fb8d_905a_795b_7b8c5620289e
  style d00def25_dca2_e600_04f5_851128959741 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/utils/function_calling.py lines 231–238

def _convert_typed_dict_to_openai_function(typed_dict: type) -> FunctionDescription:
    visited: dict = {}

    model = cast(
        "type[BaseModel]",
        _convert_any_typed_dicts_to_pydantic(typed_dict, visited=visited),
    )
    return _convert_pydantic_to_openai_function(model)

Domain

Subdomains

Frequently Asked Questions

What does _convert_typed_dict_to_openai_function() do?
_convert_typed_dict_to_openai_function() is a function in the langchain codebase, defined in libs/core/langchain_core/utils/function_calling.py.
Where is _convert_typed_dict_to_openai_function() defined?
_convert_typed_dict_to_openai_function() is defined in libs/core/langchain_core/utils/function_calling.py at line 231.
What does _convert_typed_dict_to_openai_function() call?
_convert_typed_dict_to_openai_function() calls 2 function(s): _convert_any_typed_dicts_to_pydantic, _convert_pydantic_to_openai_function.
What calls _convert_typed_dict_to_openai_function()?
_convert_typed_dict_to_openai_function() is called by 1 function(s): convert_to_openai_function.

Analyze Your Own Codebase

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

Try Supermodel Free