Toggle Menu
Prev Up Next

# `langchain_core.utils.function_calling`.convert_python_function_to_openai_function

langchain_core.utils.function_calling.convert_python_function_to_openai_function(function: Callable) → Dict[str, Any]

  [Deprecated] Convert a Python function to an OpenAI function-calling API compatible dict.

  Assumes the Python function has type hints and a docstring with a description. If

    the docstring has Google Python style argument descriptions, these will be included as well.

  Notes

  Deprecated since version 0.1.16: Use langchain_core.utils.function_calling.convert_to_openai_function() instead.

  Parameters

    function (Callable) –

  Return type

    Dict[str, Any]