"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
# @generated-id: 2e9ef5800117

from __future__ import annotations
from .function import Function, FunctionTypedDict
from mistralai.client.types import BaseModel
from mistralai.client.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import Literal
from typing_extensions import Annotated, TypedDict


class FunctionToolTypedDict(TypedDict):
    function: FunctionTypedDict
    type: Literal["function"]


class FunctionTool(BaseModel):
    function: Function

    type: Annotated[
        Annotated[Literal["function"], AfterValidator(validate_const("function"))],
        pydantic.Field(alias="type"),
    ] = "function"


try:
    FunctionTool.model_rebuild()
except NameError:
    pass
