Skip to main content

Documentation Index

Fetch the complete documentation index at: https://private-04b27de1.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

get_function_schema

get_function_schema(
    f: Callable[..., Any],
    *,
    name: str | None = None,
    description: str
) -> dict[str, Any]
Get a JSON schema for a function as defined by the OpenAI API Parameters:
NameDescription
fThe function to get the JSON schema for

Type: Callable[…, Any]
nameThe name of the function

Type: str | None

Default: None
descriptionThe description of the function

Type: str
Returns:
TypeDescription
dict[str, typing.Any]A JSON schema for the function