mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
chore: 🐝 Update SDK - Generate (spec change merged) 0.11.11 (#410)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev> Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
speakeasybot
speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
parent
1da6f0d903
commit
164490028b
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "openrouter"
|
||||
__version__: str = "0.11.10"
|
||||
__version__: str = "0.11.11"
|
||||
__openapi_doc_version__: str = "1.0.0"
|
||||
__gen_version__: str = "2.914.0"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.11.10 2.914.0 1.0.0 openrouter"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.11.11 2.914.0 1.0.0 openrouter"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
@@ -1179,6 +1179,12 @@ if TYPE_CHECKING:
|
||||
ImageGenStreamErrorEventType,
|
||||
ImageGenStreamErrorEventTypedDict,
|
||||
)
|
||||
from .imagegentextchunkevent import (
|
||||
ImageGenTextChunkEvent,
|
||||
ImageGenTextChunkEventPhase,
|
||||
ImageGenTextChunkEventType,
|
||||
ImageGenTextChunkEventTypedDict,
|
||||
)
|
||||
from .imagemodelarchitecture import (
|
||||
ImageModelArchitecture,
|
||||
ImageModelArchitectureTypedDict,
|
||||
@@ -3533,6 +3539,10 @@ __all__ = [
|
||||
"ImageGenStreamErrorEventErrorTypedDict",
|
||||
"ImageGenStreamErrorEventType",
|
||||
"ImageGenStreamErrorEventTypedDict",
|
||||
"ImageGenTextChunkEvent",
|
||||
"ImageGenTextChunkEventPhase",
|
||||
"ImageGenTextChunkEventType",
|
||||
"ImageGenTextChunkEventTypedDict",
|
||||
"ImageGenerationRequest",
|
||||
"ImageGenerationRequestAspectRatio",
|
||||
"ImageGenerationRequestBackground",
|
||||
@@ -5556,6 +5566,10 @@ _dynamic_imports: dict[str, str] = {
|
||||
"ImageGenStreamErrorEventErrorTypedDict": ".imagegenstreamerrorevent",
|
||||
"ImageGenStreamErrorEventType": ".imagegenstreamerrorevent",
|
||||
"ImageGenStreamErrorEventTypedDict": ".imagegenstreamerrorevent",
|
||||
"ImageGenTextChunkEvent": ".imagegentextchunkevent",
|
||||
"ImageGenTextChunkEventPhase": ".imagegentextchunkevent",
|
||||
"ImageGenTextChunkEventType": ".imagegentextchunkevent",
|
||||
"ImageGenTextChunkEventTypedDict": ".imagegentextchunkevent",
|
||||
"ImageModelArchitecture": ".imagemodelarchitecture",
|
||||
"ImageModelArchitectureTypedDict": ".imagemodelarchitecture",
|
||||
"ImageModelEndpointsResponse": ".imagemodelendpointsresponse",
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
"""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"""
|
||||
@@ -13,6 +13,10 @@ from .imagegenstreamerrorevent import (
|
||||
ImageGenStreamErrorEvent,
|
||||
ImageGenStreamErrorEventTypedDict,
|
||||
)
|
||||
from .imagegentextchunkevent import (
|
||||
ImageGenTextChunkEvent,
|
||||
ImageGenTextChunkEventTypedDict,
|
||||
)
|
||||
from functools import partial
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils.unions import parse_open_union
|
||||
@@ -27,6 +31,7 @@ ImageStreamingResponseDataTypedDict = TypeAliasType(
|
||||
Union[
|
||||
ImageGenStreamErrorEventTypedDict,
|
||||
ImageGenPartialImageEventTypedDict,
|
||||
ImageGenTextChunkEventTypedDict,
|
||||
ImageGenCompletedEventTypedDict,
|
||||
],
|
||||
)
|
||||
@@ -44,6 +49,7 @@ class UnknownImageStreamingResponseData(BaseModel):
|
||||
|
||||
_IMAGE_STREAMING_RESPONSE_DATA_VARIANTS: dict[str, Any] = {
|
||||
"image_generation.partial_image": ImageGenPartialImageEvent,
|
||||
"image_generation.text_chunk": ImageGenTextChunkEvent,
|
||||
"image_generation.completed": ImageGenCompletedEvent,
|
||||
"error": ImageGenStreamErrorEvent,
|
||||
}
|
||||
@@ -52,6 +58,7 @@ _IMAGE_STREAMING_RESPONSE_DATA_VARIANTS: dict[str, Any] = {
|
||||
ImageStreamingResponseData = Annotated[
|
||||
Union[
|
||||
ImageGenPartialImageEvent,
|
||||
ImageGenTextChunkEvent,
|
||||
ImageGenCompletedEvent,
|
||||
ImageGenStreamErrorEvent,
|
||||
UnknownImageStreamingResponseData,
|
||||
|
||||
Reference in New Issue
Block a user