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

from __future__ import annotations
from .chatchoice import ChatChoice, ChatChoiceTypedDict
from .usage import Usage, UsageTypedDict
from friendli.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class ChatResultTypedDict(TypedDict):
    r"""Successfully generated a chat response."""

    choices: List[ChatChoiceTypedDict]
    usage: UsageTypedDict
    created: NotRequired[int]
    r"""The Unix timestamp (in seconds) for when the generation completed."""


class ChatResult(BaseModel):
    r"""Successfully generated a chat response."""

    choices: List[ChatChoice]

    usage: Usage

    created: Optional[int] = None
    r"""The Unix timestamp (in seconds) for when the generation completed."""
