"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations

from typing import Union

from pydantic import Discriminator, Tag
from typing_extensions import Annotated, TypeAliasType

from friendli.utils import get_discriminator

from .filebuiltintool import FileBuiltInTool, FileBuiltInToolTypedDict
from .otherbuiltintool import OtherBuiltInTool, OtherBuiltInToolTypedDict
from .tool import Tool, ToolTypedDict

ToolAssistedChatToolTypedDict = TypeAliasType(
    "ToolAssistedChatToolTypedDict",
    Union[OtherBuiltInToolTypedDict, ToolTypedDict, FileBuiltInToolTypedDict],
)


ToolAssistedChatTool = Annotated[
    Union[
        Annotated[OtherBuiltInTool, Tag("code:python-interpreter")],
        Annotated[FileBuiltInTool, Tag("file:text")],
        Annotated[Tool, Tag("function")],
        Annotated[OtherBuiltInTool, Tag("math:calculator")],
        Annotated[OtherBuiltInTool, Tag("math:calendar")],
        Annotated[OtherBuiltInTool, Tag("math:statistics")],
        Annotated[OtherBuiltInTool, Tag("web:search")],
        Annotated[OtherBuiltInTool, Tag("web:url")],
    ],
    Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
