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

from __future__ import annotations
from .chattranscriptionevent import (
    ChatTranscriptionEvent,
    ChatTranscriptionEventTypedDict,
)
from datetime import datetime
from mistralai.client.types import BaseModel, Nullable
from typing import Any, Dict, List, Union
from typing_extensions import TypeAliasType, TypedDict


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


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


class ChatCompletionEventTypedDict(TypedDict):
    event_id: str
    correlation_id: str
    created_at: datetime
    extra_fields: Dict[str, Nullable[ChatCompletionEventExtraFieldsTypedDict]]
    nb_input_tokens: int
    nb_output_tokens: int
    enabled_tools: List[Dict[str, Any]]
    request_messages: List[Dict[str, Any]]
    response_messages: List[Dict[str, Any]]
    nb_messages: int
    chat_transcription_events: List[ChatTranscriptionEventTypedDict]


class ChatCompletionEvent(BaseModel):
    event_id: str

    correlation_id: str

    created_at: datetime

    extra_fields: Dict[str, Nullable[ChatCompletionEventExtraFields]]

    nb_input_tokens: int

    nb_output_tokens: int

    enabled_tools: List[Dict[str, Any]]

    request_messages: List[Dict[str, Any]]

    response_messages: List[Dict[str, Any]]

    nb_messages: int

    chat_transcription_events: List[ChatTranscriptionEvent]
