# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .chat_completion_stream_response_choice import ChatCompletionStreamResponseChoice


class CreateChatCompletionStreamResponse(UniversalBaseModel):
    """
    The response object for streaming chat completions in chunks.
    """

    object: typing.Literal["chat.completion.chunk"] = pydantic.Field(default="chat.completion.chunk")
    """
    The object type, which is always 'chat.completion.chunk' for streaming responses.
    """

    choices: typing.List[ChatCompletionStreamResponseChoice] = pydantic.Field()
    """
    A list of chat completion chunks.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
