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

from __future__ import annotations
from .streamedchatchoice import StreamedChatChoice, StreamedChatChoiceTypedDict
from .usage import Usage, UsageTypedDict
from friendli.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class DataTypedDict(TypedDict):
    choices: List[StreamedChatChoiceTypedDict]
    created: int
    r"""The Unix timestamp (in seconds) for when the token sampled."""
    usage: NotRequired[UsageTypedDict]


class Data(BaseModel):
    choices: List[StreamedChatChoice]

    created: int
    r"""The Unix timestamp (in seconds) for when the token sampled."""

    usage: Optional[Usage] = None


class StreamedChatResultTypedDict(TypedDict):
    r"""A server-sent event containing chat completions content."""

    data: DataTypedDict


class StreamedChatResult(BaseModel):
    r"""A server-sent event containing chat completions content."""

    data: Data
