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

import datetime as dt
import typing

import typing_extensions
from ..types.conversation_item_role import ConversationItemRole
from .conversation_item_tool_calls_item import ConversationItemToolCallsItemParams


class ConversationItemParams(typing_extensions.TypedDict):
    item_idx: int
    """
    Index of the item in the conversation.
    """

    role: ConversationItemRole
    """
    Who spoke in this turn.
    """

    live_transcript: str
    """
    Live transcript of this turn.
    """

    post_call_transcript: typing.Optional[str]
    """
    Post-call processed transcript.
    """

    duration_ms: float
    """
    Duration of this turn in milliseconds.
    """

    started_at: dt.datetime
    """
    When this turn started.
    """

    voice_id: typing_extensions.NotRequired[str]
    """
    Voice ID used (assistant only).
    """

    audio_speed: typing_extensions.NotRequired[float]
    """
    Audio speed used (assistant only).
    """

    system_prompt: typing_extensions.NotRequired[str]
    """
    System prompt used for this assistant turn.
    """

    tool_calls: typing_extensions.NotRequired[typing.Sequence[ConversationItemToolCallsItemParams]]
    """
    Tool calls made by the assistant.
    """
