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

from __future__ import annotations
from .completionschoice import CompletionsChoice, CompletionsChoiceTypedDict
from .usage import Usage, UsageTypedDict
from friendli.types import BaseModel
from typing import List, Literal
from typing_extensions import TypedDict


StreamedCompletionsTokenCompleteEvent = Literal["complete"]
r"""Type of server-sent event."""


class StreamedCompletionsTokenCompleteTypedDict(TypedDict):
    event: StreamedCompletionsTokenCompleteEvent
    r"""Type of server-sent event."""
    choices: List[CompletionsChoiceTypedDict]
    usage: UsageTypedDict


class StreamedCompletionsTokenComplete(BaseModel):
    event: StreamedCompletionsTokenCompleteEvent
    r"""Type of server-sent event."""

    choices: List[CompletionsChoice]

    usage: Usage
