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

from __future__ import annotations
from honeyhive.types import BaseModel
from typing import Any, Dict, List, Optional, TypedDict
from typing_extensions import NotRequired


class CreateModelEventTypedDict(TypedDict):
    project: str
    r"""Project associated with the event"""
    model: str
    r"""Model name"""
    provider: str
    r"""Model provider"""
    messages: List[Dict[str, Any]]
    r"""Messages passed to the model"""
    response: Dict[str, Any]
    r"""Final output JSON of the event"""
    duration: float
    r"""How long the event took in milliseconds"""
    usage: Dict[str, Any]
    r"""Usage statistics of the model"""
    cost: NotRequired[float]
    r"""Cost of the model completion"""
    error: NotRequired[str]
    r"""Any error description if event failed"""
    source: NotRequired[str]
    r"""Source of the event - production, staging, etc"""
    event_name: NotRequired[str]
    r"""Name of the event"""
    hyperparameters: NotRequired[Dict[str, Any]]
    r"""Hyperparameters used for the model"""
    template: NotRequired[List[Dict[str, Any]]]
    r"""Template used for the model"""
    template_inputs: NotRequired[Dict[str, Any]]
    r"""Inputs for the template"""
    tools: NotRequired[List[Dict[str, Any]]]
    r"""Tools used for the model"""
    tool_choice: NotRequired[str]
    r"""Tool choice for the model"""
    response_format: NotRequired[Dict[str, Any]]
    r"""Response format for the model"""


class CreateModelEvent(BaseModel):
    project: str
    r"""Project associated with the event"""

    model: str
    r"""Model name"""

    provider: str
    r"""Model provider"""

    messages: List[Dict[str, Any]]
    r"""Messages passed to the model"""

    response: Dict[str, Any]
    r"""Final output JSON of the event"""

    duration: float
    r"""How long the event took in milliseconds"""

    usage: Dict[str, Any]
    r"""Usage statistics of the model"""

    cost: Optional[float] = None
    r"""Cost of the model completion"""

    error: Optional[str] = None
    r"""Any error description if event failed"""

    source: Optional[str] = None
    r"""Source of the event - production, staging, etc"""

    event_name: Optional[str] = None
    r"""Name of the event"""

    hyperparameters: Optional[Dict[str, Any]] = None
    r"""Hyperparameters used for the model"""

    template: Optional[List[Dict[str, Any]]] = None
    r"""Template used for the model"""

    template_inputs: Optional[Dict[str, Any]] = None
    r"""Inputs for the template"""

    tools: Optional[List[Dict[str, Any]]] = None
    r"""Tools used for the model"""

    tool_choice: Optional[str] = None
    r"""Tool choice for the model"""

    response_format: Optional[Dict[str, Any]] = None
    r"""Response format for the model"""
