"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
# @generated-id: 1cd843828e99

from __future__ import annotations
from datetime import datetime
from mistralai.client.types import BaseModel, Nullable
from typing import Dict, List, Union
from typing_extensions import TypeAliasType, TypedDict


ChatCompletionEventPreviewExtraFieldsTypedDict = TypeAliasType(
    "ChatCompletionEventPreviewExtraFieldsTypedDict",
    Union[bool, int, float, str, datetime, List[str]],
)


ChatCompletionEventPreviewExtraFields = TypeAliasType(
    "ChatCompletionEventPreviewExtraFields",
    Union[bool, int, float, str, datetime, List[str]],
)


class ChatCompletionEventPreviewTypedDict(TypedDict):
    event_id: str
    correlation_id: str
    created_at: datetime
    extra_fields: Dict[str, Nullable[ChatCompletionEventPreviewExtraFieldsTypedDict]]
    nb_input_tokens: int
    nb_output_tokens: int


class ChatCompletionEventPreview(BaseModel):
    event_id: str

    correlation_id: str

    created_at: datetime

    extra_fields: Dict[str, Nullable[ChatCompletionEventPreviewExtraFields]]

    nb_input_tokens: int

    nb_output_tokens: int
