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

from __future__ import annotations
from .filebuiltintool import FileBuiltInTool, FileBuiltInToolTypedDict
from .friendlibuiltintool import FriendliBuiltInTool, FriendliBuiltInToolTypedDict
from .integratedbuiltintool import IntegratedBuiltInTool, IntegratedBuiltInToolTypedDict
from .tool import Tool, ToolTypedDict
from friendli.core.utils import get_discriminator
from pydantic import Discriminator, Tag
from typing import Union
from typing_extensions import Annotated, TypeAliasType

ToolAssistedChatToolTypedDict = TypeAliasType(
    "ToolAssistedChatToolTypedDict",
    Union[
        FriendliBuiltInToolTypedDict,
        IntegratedBuiltInToolTypedDict,
        ToolTypedDict,
        FileBuiltInToolTypedDict,
    ],
)
ToolAssistedChatTool = Annotated[
    Union[
        Annotated[FriendliBuiltInTool, Tag("code:python-interpreter")],
        Annotated[FileBuiltInTool, Tag("file:text")],
        Annotated[Tool, Tag("function")],
        Annotated[IntegratedBuiltInTool, Tag("linkup:search")],
        Annotated[FriendliBuiltInTool, Tag("math:calculator")],
        Annotated[FriendliBuiltInTool, Tag("math:calendar")],
        Annotated[FriendliBuiltInTool, Tag("math:statistics")],
        Annotated[FriendliBuiltInTool, Tag("web:search")],
        Annotated[FriendliBuiltInTool, Tag("web:url")],
    ],
    Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
