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

from __future__ import annotations
from .toolcall import ToolCall, ToolCallTypedDict
from r9s.types import BaseModel
from typing import List, Literal, Optional
from typing_extensions import NotRequired, TypedDict


ChatCompletionStreamDeltaRole = Literal[
    "system",
    "user",
    "assistant",
]


class ChatCompletionStreamDeltaTypedDict(TypedDict):
    role: NotRequired[ChatCompletionStreamDeltaRole]
    content: NotRequired[str]
    tool_calls: NotRequired[List[ToolCallTypedDict]]
    reasoning_content: NotRequired[str]


class ChatCompletionStreamDelta(BaseModel):
    role: Optional[ChatCompletionStreamDeltaRole] = None

    content: Optional[str] = None

    tool_calls: Optional[List[ToolCall]] = None

    reasoning_content: Optional[str] = None
