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

from __future__ import annotations
from .chatchoice import ChatChoice, ChatChoiceTypedDict
from .chatusage import ChatUsage, ChatUsageTypedDict
from friendli.types import BaseModel
from friendli.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import List, Literal
from typing_extensions import Annotated, TypedDict


class DedicatedChatCompleteSuccessTypedDict(TypedDict):
    choices: List[ChatChoiceTypedDict]
    created: int
    r"""The Unix timestamp (in seconds) for when the generation completed."""
    id: str
    r"""A unique ID of the completion."""
    usage: ChatUsageTypedDict
    object: Literal["chat.completion"]
    r"""The object type, which is always set to `chat.completion`."""


class DedicatedChatCompleteSuccess(BaseModel):
    choices: List[ChatChoice]

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

    id: str
    r"""A unique ID of the completion."""

    usage: ChatUsage

    OBJECT: Annotated[
        Annotated[
            Literal["chat.completion"],
            AfterValidator(validate_const("chat.completion")),
        ],
        pydantic.Field(alias="object"),
    ] = "chat.completion"
    r"""The object type, which is always set to `chat.completion`."""
