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

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


Event = Literal["token_sampled"]
r"""Type of server-sent event."""


class StreamedCompletionsTokenSampledTypedDict(TypedDict):
    event: Event
    r"""Type of server-sent event."""
    index: int
    r"""The index of the choice in the list of generated choices."""
    text: str
    r"""Generated text output."""
    token: int
    r"""Generated output token."""


class StreamedCompletionsTokenSampled(BaseModel):
    event: Event
    r"""Type of server-sent event."""

    index: int
    r"""The index of the choice in the list of generated choices."""

    text: str
    r"""Generated text output."""

    token: int
    r"""Generated output token."""
