# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .think_settings_v1functions_item_endpoint import ThinkSettingsV1FunctionsItemEndpoint


class ThinkSettingsV1FunctionsItem(UniversalBaseModel):
    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Function name
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Function description
    """

    parameters: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
    """
    Function parameters
    """

    endpoint: typing.Optional[ThinkSettingsV1FunctionsItemEndpoint] = pydantic.Field(default=None)
    """
    The Function endpoint to call. if not passed, function is called client-side
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
