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

from __future__ import annotations
from friendli.types import BaseModel
from typing import Literal, Optional
from typing_extensions import NotRequired, TypedDict


ToolMessageRole = Literal["tool"]
r"""The role of the messages author."""


class ToolMessageTypedDict(TypedDict):
    role: ToolMessageRole
    r"""The role of the messages author."""
    content: str
    r"""The content of tool message that contains the result of tool calling."""
    tool_call_id: str
    r"""The ID of tool call corresponding to this message."""
    name: NotRequired[str]
    r"""An optional name of the tool call corresponding to this message."""


class ToolMessage(BaseModel):
    role: ToolMessageRole
    r"""The role of the messages author."""

    content: str
    r"""The content of tool message that contains the result of tool calling."""

    tool_call_id: str
    r"""The ID of tool call corresponding to this message."""

    name: Optional[str] = None
    r"""An optional name of the tool call corresponding to this message."""
