mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
Co-authored-by: speakeasybot <bot@speakeasyapi.dev> Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
46 lines
1.6 KiB
Python
46 lines
1.6 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from openrouter.types import BaseModel, UnrecognizedStr
|
|
from typing import Literal, Union
|
|
from typing_extensions import TypedDict
|
|
|
|
|
|
ImageGenTextChunkEventPhase = Union[
|
|
Literal[
|
|
"content",
|
|
"reasoning",
|
|
"draft",
|
|
],
|
|
UnrecognizedStr,
|
|
]
|
|
r"""The generation phase this chunk belongs to. `content` is the renderable output; `reasoning` and `draft` are intermediate provider phases."""
|
|
|
|
|
|
ImageGenTextChunkEventType = Literal["image_generation.text_chunk",]
|
|
r"""The event type"""
|
|
|
|
|
|
class ImageGenTextChunkEventTypedDict(TypedDict):
|
|
r"""Emitted when a text chunk becomes available during streaming generation of text-based formats (e.g. SVG)"""
|
|
|
|
phase: ImageGenTextChunkEventPhase
|
|
r"""The generation phase this chunk belongs to. `content` is the renderable output; `reasoning` and `draft` are intermediate provider phases."""
|
|
text: str
|
|
r"""A text fragment of the image being generated (e.g. partial SVG markup)"""
|
|
type: ImageGenTextChunkEventType
|
|
r"""The event type"""
|
|
|
|
|
|
class ImageGenTextChunkEvent(BaseModel):
|
|
r"""Emitted when a text chunk becomes available during streaming generation of text-based formats (e.g. SVG)"""
|
|
|
|
phase: ImageGenTextChunkEventPhase
|
|
r"""The generation phase this chunk belongs to. `content` is the renderable output; `reasoning` and `draft` are intermediate provider phases."""
|
|
|
|
text: str
|
|
r"""A text fragment of the image being generated (e.g. partial SVG markup)"""
|
|
|
|
type: ImageGenTextChunkEventType
|
|
r"""The event type"""
|