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 0.9.2 (#205)
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
0c735989c1
commit
0f116c9792
@@ -1,7 +1,12 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import providerpreferences as components_providerpreferences
|
||||
from openrouter.components import (
|
||||
contentpartinputaudio as components_contentpartinputaudio,
|
||||
contentpartinputfile as components_contentpartinputfile,
|
||||
contentpartinputvideo as components_contentpartinputvideo,
|
||||
providerpreferences as components_providerpreferences,
|
||||
)
|
||||
from openrouter.types import (
|
||||
BaseModel,
|
||||
Nullable,
|
||||
@@ -117,7 +122,14 @@ class ContentText(BaseModel):
|
||||
|
||||
|
||||
ContentTypedDict = TypeAliasType(
|
||||
"ContentTypedDict", Union[ContentTextTypedDict, ContentImageURLTypedDict]
|
||||
"ContentTypedDict",
|
||||
Union[
|
||||
ContentTextTypedDict,
|
||||
ContentImageURLTypedDict,
|
||||
components_contentpartinputaudio.ContentPartInputAudioTypedDict,
|
||||
components_contentpartinputvideo.ContentPartInputVideoTypedDict,
|
||||
components_contentpartinputfile.ContentPartInputFileTypedDict,
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -125,6 +137,15 @@ Content = Annotated[
|
||||
Union[
|
||||
Annotated[ContentText, Tag("text")],
|
||||
Annotated[ContentImageURL, Tag("image_url")],
|
||||
Annotated[
|
||||
components_contentpartinputaudio.ContentPartInputAudio, Tag("input_audio")
|
||||
],
|
||||
Annotated[
|
||||
components_contentpartinputvideo.ContentPartInputVideo, Tag("input_video")
|
||||
],
|
||||
Annotated[
|
||||
components_contentpartinputfile.ContentPartInputFile, Tag("input_file")
|
||||
],
|
||||
],
|
||||
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
||||
]
|
||||
@@ -323,6 +344,40 @@ class CreateEmbeddingsData(BaseModel):
|
||||
Object = Literal["list",]
|
||||
|
||||
|
||||
class PromptTokensDetailsTypedDict(TypedDict):
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
audio_tokens: NotRequired[int]
|
||||
r"""Number of audio tokens in the input"""
|
||||
file_tokens: NotRequired[int]
|
||||
r"""Number of file/document tokens in the input"""
|
||||
image_tokens: NotRequired[int]
|
||||
r"""Number of image tokens in the input"""
|
||||
text_tokens: NotRequired[int]
|
||||
r"""Number of text tokens in the input"""
|
||||
video_tokens: NotRequired[int]
|
||||
r"""Number of video tokens in the input"""
|
||||
|
||||
|
||||
class PromptTokensDetails(BaseModel):
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
audio_tokens: Optional[int] = None
|
||||
r"""Number of audio tokens in the input"""
|
||||
|
||||
file_tokens: Optional[int] = None
|
||||
r"""Number of file/document tokens in the input"""
|
||||
|
||||
image_tokens: Optional[int] = None
|
||||
r"""Number of image tokens in the input"""
|
||||
|
||||
text_tokens: Optional[int] = None
|
||||
r"""Number of text tokens in the input"""
|
||||
|
||||
video_tokens: Optional[int] = None
|
||||
r"""Number of video tokens in the input"""
|
||||
|
||||
|
||||
class CreateEmbeddingsUsageTypedDict(TypedDict):
|
||||
r"""Token usage statistics"""
|
||||
|
||||
@@ -332,6 +387,8 @@ class CreateEmbeddingsUsageTypedDict(TypedDict):
|
||||
r"""Total number of tokens used"""
|
||||
cost: NotRequired[float]
|
||||
r"""Cost of the request in credits"""
|
||||
prompt_tokens_details: NotRequired[PromptTokensDetailsTypedDict]
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
|
||||
class CreateEmbeddingsUsage(BaseModel):
|
||||
@@ -346,6 +403,9 @@ class CreateEmbeddingsUsage(BaseModel):
|
||||
cost: Optional[float] = None
|
||||
r"""Cost of the request in credits"""
|
||||
|
||||
prompt_tokens_details: Optional[PromptTokensDetails] = None
|
||||
r"""Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included."""
|
||||
|
||||
|
||||
class CreateEmbeddingsResponseBodyTypedDict(TypedDict):
|
||||
r"""Embeddings response containing embedding vectors"""
|
||||
|
||||
Reference in New Issue
Block a user