Merge pull request #15580 from aniketmaurya/patch-1

Add type hint to function_to_dict and fix typo
This commit is contained in:
Krish Dholakia 2025-10-16 07:30:29 -07:00 committed by GitHub
commit 68caebe119
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5121,9 +5121,9 @@ def json_schema_type(python_type_name: str):
return python_to_json_schema_types.get(python_type_name, "string")
def function_to_dict(input_function): # noqa: C901
def function_to_dict(input_function) -> dict: # noqa: C901
"""Using type hints and numpy-styled docstring,
produce a dictionnary usable for OpenAI function calling
produce a dictionary usable for OpenAI function calling
Parameters
----------