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

from __future__ import annotations
from acuvity.types import BaseModel
from enum import Enum
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class Choice(str, Enum):
    r"""Model instructions on tool choice."""

    AUTO = "Auto"
    ANY = "Any"
    NONE = "None"
    TOOL = "Tool"


class ToolchoiceTypedDict(TypedDict):
    r"""Represents the tool choice that can be passed along together with tools."""

    choice: NotRequired[Choice]
    r"""Model instructions on tool choice."""
    name: NotRequired[str]
    r"""If choice is Tool, this will be set to the name of the tool to use."""


class Toolchoice(BaseModel):
    r"""Represents the tool choice that can be passed along together with tools."""

    choice: Optional[Choice] = Choice.AUTO
    r"""Model instructions on tool choice."""

    name: Optional[str] = None
    r"""If choice is Tool, this will be set to the name of the tool to use."""
