mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f34360adc | ||
|
|
c07f60e7b1 |
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(python3:*)"
|
||||
"Bash(python3:*)",
|
||||
"Bash(git push:*)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
+9
-5
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
||||
management:
|
||||
docChecksum: 4cc4a9d9115d0eca9a5eb4786505579d
|
||||
docChecksum: 459a4007b7391a38a6e9c7249c84c3bf
|
||||
docVersion: 1.0.0
|
||||
speakeasyVersion: 1.658.2
|
||||
generationVersion: 2.755.9
|
||||
releaseVersion: 0.0.19
|
||||
configChecksum: 834d5c1cea368e35ab6535ffb2bf9e7a
|
||||
releaseVersion: 0.0.22
|
||||
configChecksum: dbd5388c5e9e39132e6f3418d4959462
|
||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
published: true
|
||||
@@ -67,12 +67,14 @@ generatedFiles:
|
||||
- docs/components/chatmessagecontentitemaudio.md
|
||||
- docs/components/chatmessagecontentitemaudioformat.md
|
||||
- docs/components/chatmessagecontentitemaudioinputaudio.md
|
||||
- docs/components/chatmessagecontentitemfile.md
|
||||
- docs/components/chatmessagecontentitemimage.md
|
||||
- docs/components/chatmessagecontentitemimagedetail.md
|
||||
- docs/components/chatmessagecontentitemtext.md
|
||||
- docs/components/chatmessagecontentitemvideo.md
|
||||
- docs/components/chatmessagecontentitemvideoinputvideo.md
|
||||
- docs/components/chatmessagecontentitemvideovideourl.md
|
||||
- docs/components/chatmessagecontentitemvideovideourlvideourl.md
|
||||
- docs/components/chatmessagetokenlogprob.md
|
||||
- docs/components/chatmessagetokenlogprobs.md
|
||||
- docs/components/chatmessagetoolcall.md
|
||||
@@ -110,6 +112,7 @@ generatedFiles:
|
||||
- docs/components/effort.md
|
||||
- docs/components/endpointstatus.md
|
||||
- docs/components/engine.md
|
||||
- docs/components/file.md
|
||||
- docs/components/filecitation.md
|
||||
- docs/components/filecitationtype.md
|
||||
- docs/components/filepath.md
|
||||
@@ -416,8 +419,7 @@ generatedFiles:
|
||||
- docs/components/usermessage.md
|
||||
- docs/components/usermessagecontent.md
|
||||
- docs/components/variables.md
|
||||
- docs/components/videourl1.md
|
||||
- docs/components/videourl2.md
|
||||
- docs/components/videourl.md
|
||||
- docs/components/websearchpreviewtooluserlocation.md
|
||||
- docs/components/websearchpreviewtooluserlocationtype.md
|
||||
- docs/components/websearchstatus.md
|
||||
@@ -554,6 +556,7 @@ generatedFiles:
|
||||
- src/openrouter/components/chatgenerationtokenusage.py
|
||||
- src/openrouter/components/chatmessagecontentitem.py
|
||||
- src/openrouter/components/chatmessagecontentitemaudio.py
|
||||
- src/openrouter/components/chatmessagecontentitemfile.py
|
||||
- src/openrouter/components/chatmessagecontentitemimage.py
|
||||
- src/openrouter/components/chatmessagecontentitemtext.py
|
||||
- src/openrouter/components/chatmessagecontentitemvideo.py
|
||||
@@ -684,6 +687,7 @@ generatedFiles:
|
||||
- src/openrouter/components/unprocessableentityresponseerrordata.py
|
||||
- src/openrouter/components/urlcitation.py
|
||||
- src/openrouter/components/usermessage.py
|
||||
- src/openrouter/components/videourl.py
|
||||
- src/openrouter/components/websearchpreviewtooluserlocation.py
|
||||
- src/openrouter/components/websearchstatus.py
|
||||
- src/openrouter/credits.py
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ generation:
|
||||
generateNewTests: true
|
||||
skipResponseBodyAssertions: false
|
||||
python:
|
||||
version: 0.0.19
|
||||
version: 0.0.22
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
|
||||
@@ -4647,12 +4647,7 @@ components:
|
||||
type: string
|
||||
const: input_video
|
||||
video_url:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
required:
|
||||
- url
|
||||
$ref: '#/components/schemas/VideoURL'
|
||||
required:
|
||||
- type
|
||||
- video_url
|
||||
@@ -4672,12 +4667,40 @@ components:
|
||||
- type
|
||||
- video_url
|
||||
type: object
|
||||
VideoURL:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
required:
|
||||
- url
|
||||
ChatMessageContentItemFile:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
const: file
|
||||
file:
|
||||
type: object
|
||||
properties:
|
||||
file_data:
|
||||
type: string
|
||||
file_id:
|
||||
type: string
|
||||
filename:
|
||||
type: string
|
||||
required:
|
||||
- file_data
|
||||
required:
|
||||
- type
|
||||
- file
|
||||
ChatMessageContentItem:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ChatMessageContentItemText'
|
||||
- $ref: '#/components/schemas/ChatMessageContentItemImage'
|
||||
- $ref: '#/components/schemas/ChatMessageContentItemAudio'
|
||||
- $ref: '#/components/schemas/ChatMessageContentItemVideo'
|
||||
- $ref: '#/components/schemas/ChatMessageContentItemFile'
|
||||
type: object
|
||||
discriminator:
|
||||
propertyName: type
|
||||
@@ -4687,6 +4710,7 @@ components:
|
||||
input_audio: '#/components/schemas/ChatMessageContentItemAudio'
|
||||
input_video: '#/components/schemas/ChatMessageContentItemVideo'
|
||||
video_url: '#/components/schemas/ChatMessageContentItemVideo'
|
||||
file: '#/components/schemas/ChatMessageContentItemFile'
|
||||
ChatMessageToolCall:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
+8315
-8291
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
overlay: 1.0.0
|
||||
x-speakeasy-jsonpath: rfc9535
|
||||
info:
|
||||
title: Add open enums
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $..[?length(@.enum) > 1]
|
||||
description: Automatically open all enums that have length > 1
|
||||
update:
|
||||
x-speakeasy-unknown-values: allow
|
||||
@@ -0,0 +1,15 @@
|
||||
overlay: 1.0.0
|
||||
x-speakeasy-jsonpath: rfc9535
|
||||
info:
|
||||
title: Remove RSS+XML response schemas and related parameters
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $..responses.*.content["application/rss+xml"]
|
||||
description: Remove application/rss+xml response schemas
|
||||
remove: true
|
||||
- target: $..parameters[?@.name == "use_rss"]
|
||||
description: Remove use_rss parameter
|
||||
remove: true
|
||||
- target: $..parameters[?@.name == "use_rss_chat_links"]
|
||||
description: Remove use_rss_chat_links parameter
|
||||
remove: true
|
||||
@@ -6,26 +6,41 @@ sources:
|
||||
sourceBlobDigest: sha256:635d63fd18db468c1dcc23700382af788de76594ba3b8292fae9b14c0e5c22c4
|
||||
tags:
|
||||
- latest
|
||||
OpenRouter API:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:f1b59b9b643de5e20d6e3299a8274783d8c0854615876f5d7f6f081814842695
|
||||
sourceBlobDigest: sha256:ee1f2422281b3ed5b38951c74636ad192c9bb160f216069c1f7931ccc4e52553
|
||||
tags:
|
||||
- latest
|
||||
- 1.0.0
|
||||
targets:
|
||||
open-router:
|
||||
source: -OAS
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:fc0c90dc8ebb69ef4a571e4e63dcd7f8f33c3254c17ad2583b628fbbf3d1ac05
|
||||
sourceBlobDigest: sha256:635d63fd18db468c1dcc23700382af788de76594ba3b8292fae9b14c0e5c22c4
|
||||
openrouter:
|
||||
source: OpenRouter API
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:f1b59b9b643de5e20d6e3299a8274783d8c0854615876f5d7f6f081814842695
|
||||
sourceBlobDigest: sha256:ee1f2422281b3ed5b38951c74636ad192c9bb160f216069c1f7931ccc4e52553
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
sources:
|
||||
-OAS:
|
||||
OpenRouter API:
|
||||
inputs:
|
||||
- location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api:main
|
||||
- location: .speakeasy/in.openapi.yaml
|
||||
overlays:
|
||||
- location: .speakeasy/overlays/open-enums.overlay.yaml
|
||||
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
|
||||
output: .speakeasy/out.openapi.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/-oas
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
|
||||
targets:
|
||||
open-router:
|
||||
openrouter:
|
||||
target: python
|
||||
source: -OAS
|
||||
source: OpenRouter API
|
||||
publish:
|
||||
pypi:
|
||||
token: $pypi_token
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
sources:
|
||||
-OAS:
|
||||
OpenRouter API:
|
||||
inputs:
|
||||
- location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api:main
|
||||
- location: .speakeasy/in.openapi.yaml
|
||||
overlays:
|
||||
- location: .speakeasy/overlays/open-enums.overlay.yaml
|
||||
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
|
||||
output: .speakeasy/out.openapi.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/-oas
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
|
||||
targets:
|
||||
open-router:
|
||||
openrouter:
|
||||
target: python
|
||||
source: -OAS
|
||||
source: OpenRouter API
|
||||
publish:
|
||||
pypi:
|
||||
token: $pypi_token
|
||||
|
||||
@@ -33,3 +33,9 @@ value: components.ChatMessageContentItemVideo = /* values here */
|
||||
value: components.ChatMessageContentItemVideo = /* values here */
|
||||
```
|
||||
|
||||
### `components.ChatMessageContentItemFile`
|
||||
|
||||
```python
|
||||
value: components.ChatMessageContentItemFile = /* values here */
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# ChatMessageContentItemFile
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| `type` | *Literal["file"]* | :heavy_check_mark: | N/A |
|
||||
| `file` | [components.File](../components/file.md) | :heavy_check_mark: | N/A |
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
||||
| `type` | *Literal["input_video"]* | :heavy_check_mark: | N/A |
|
||||
| `video_url` | [components.VideoURL1](../components/videourl1.md) | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| `type` | *Literal["input_video"]* | :heavy_check_mark: | N/A |
|
||||
| `video_url` | [components.VideoURL](../components/videourl.md) | :heavy_check_mark: | N/A |
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
||||
| `type` | *Literal["video_url"]* | :heavy_check_mark: | N/A |
|
||||
| `video_url` | [components.VideoURL2](../components/videourl2.md) | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | *Literal["video_url"]* | :heavy_check_mark: | N/A |
|
||||
| `video_url` | [components.ChatMessageContentItemVideoVideoURLVideoURL](../components/chatmessagecontentitemvideovideourlvideourl.md) | :heavy_check_mark: | N/A |
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# VideoURL2
|
||||
# ChatMessageContentItemVideoVideoURLVideoURL
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -0,0 +1,10 @@
|
||||
# File
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `file_data` | *str* | :heavy_check_mark: | N/A |
|
||||
| `file_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `filename` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -1,4 +1,4 @@
|
||||
# VideoURL1
|
||||
# VideoURL
|
||||
|
||||
|
||||
## Fields
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "openrouter"
|
||||
version = "0.0.19"
|
||||
version = "0.0.22"
|
||||
description = "Official Python Client SDK for OpenRouter."
|
||||
authors = [{ name = "OpenRouter" },]
|
||||
readme = "README-PYPI.md"
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "openrouter"
|
||||
__version__: str = "0.0.19"
|
||||
__version__: str = "0.0.22"
|
||||
__openapi_doc_version__: str = "1.0.0"
|
||||
__gen_version__: str = "2.755.9"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.0.19 2.755.9 1.0.0 openrouter"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.0.22 2.755.9 1.0.0 openrouter"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
@@ -58,6 +58,12 @@ if TYPE_CHECKING:
|
||||
ChatMessageContentItemAudioInputAudioTypedDict,
|
||||
ChatMessageContentItemAudioTypedDict,
|
||||
)
|
||||
from .chatmessagecontentitemfile import (
|
||||
ChatMessageContentItemFile,
|
||||
ChatMessageContentItemFileTypedDict,
|
||||
File,
|
||||
FileTypedDict,
|
||||
)
|
||||
from .chatmessagecontentitemimage import (
|
||||
ChatMessageContentItemImage,
|
||||
ChatMessageContentItemImageDetail,
|
||||
@@ -76,10 +82,8 @@ if TYPE_CHECKING:
|
||||
ChatMessageContentItemVideoTypedDict,
|
||||
ChatMessageContentItemVideoVideoURL,
|
||||
ChatMessageContentItemVideoVideoURLTypedDict,
|
||||
VideoURL1,
|
||||
VideoURL1TypedDict,
|
||||
VideoURL2,
|
||||
VideoURL2TypedDict,
|
||||
ChatMessageContentItemVideoVideoURLVideoURL,
|
||||
ChatMessageContentItemVideoVideoURLVideoURLTypedDict,
|
||||
)
|
||||
from .chatmessagetokenlogprob import (
|
||||
ChatMessageTokenLogprob,
|
||||
@@ -780,6 +784,7 @@ if TYPE_CHECKING:
|
||||
UserMessageContentTypedDict,
|
||||
UserMessageTypedDict,
|
||||
)
|
||||
from .videourl import VideoURL, VideoURLTypedDict
|
||||
from .websearchpreviewtooluserlocation import (
|
||||
WebSearchPreviewToolUserLocation,
|
||||
WebSearchPreviewToolUserLocationType,
|
||||
@@ -824,6 +829,8 @@ __all__ = [
|
||||
"ChatMessageContentItemAudioInputAudio",
|
||||
"ChatMessageContentItemAudioInputAudioTypedDict",
|
||||
"ChatMessageContentItemAudioTypedDict",
|
||||
"ChatMessageContentItemFile",
|
||||
"ChatMessageContentItemFileTypedDict",
|
||||
"ChatMessageContentItemImage",
|
||||
"ChatMessageContentItemImageDetail",
|
||||
"ChatMessageContentItemImageTypedDict",
|
||||
@@ -836,6 +843,8 @@ __all__ = [
|
||||
"ChatMessageContentItemVideoTypedDict",
|
||||
"ChatMessageContentItemVideoVideoURL",
|
||||
"ChatMessageContentItemVideoVideoURLTypedDict",
|
||||
"ChatMessageContentItemVideoVideoURLVideoURL",
|
||||
"ChatMessageContentItemVideoVideoURLVideoURLTypedDict",
|
||||
"ChatMessageTokenLogprob",
|
||||
"ChatMessageTokenLogprobTypedDict",
|
||||
"ChatMessageTokenLogprobs",
|
||||
@@ -903,12 +912,14 @@ __all__ = [
|
||||
"Effort",
|
||||
"EndpointStatus",
|
||||
"Engine",
|
||||
"File",
|
||||
"FileCitation",
|
||||
"FileCitationType",
|
||||
"FileCitationTypedDict",
|
||||
"FilePath",
|
||||
"FilePathType",
|
||||
"FilePathTypedDict",
|
||||
"FileTypedDict",
|
||||
"ForbiddenResponseErrorData",
|
||||
"ForbiddenResponseErrorDataTypedDict",
|
||||
"IDFileParser",
|
||||
@@ -1380,10 +1391,8 @@ __all__ = [
|
||||
"UserMessageTypedDict",
|
||||
"Variables",
|
||||
"VariablesTypedDict",
|
||||
"VideoURL1",
|
||||
"VideoURL1TypedDict",
|
||||
"VideoURL2",
|
||||
"VideoURL2TypedDict",
|
||||
"VideoURL",
|
||||
"VideoURLTypedDict",
|
||||
"WebSearchPreviewToolUserLocation",
|
||||
"WebSearchPreviewToolUserLocationType",
|
||||
"WebSearchPreviewToolUserLocationTypedDict",
|
||||
@@ -1433,6 +1442,10 @@ _dynamic_imports: dict[str, str] = {
|
||||
"ChatMessageContentItemAudioInputAudio": ".chatmessagecontentitemaudio",
|
||||
"ChatMessageContentItemAudioInputAudioTypedDict": ".chatmessagecontentitemaudio",
|
||||
"ChatMessageContentItemAudioTypedDict": ".chatmessagecontentitemaudio",
|
||||
"ChatMessageContentItemFile": ".chatmessagecontentitemfile",
|
||||
"ChatMessageContentItemFileTypedDict": ".chatmessagecontentitemfile",
|
||||
"File": ".chatmessagecontentitemfile",
|
||||
"FileTypedDict": ".chatmessagecontentitemfile",
|
||||
"ChatMessageContentItemImage": ".chatmessagecontentitemimage",
|
||||
"ChatMessageContentItemImageDetail": ".chatmessagecontentitemimage",
|
||||
"ChatMessageContentItemImageTypedDict": ".chatmessagecontentitemimage",
|
||||
@@ -1446,10 +1459,8 @@ _dynamic_imports: dict[str, str] = {
|
||||
"ChatMessageContentItemVideoTypedDict": ".chatmessagecontentitemvideo",
|
||||
"ChatMessageContentItemVideoVideoURL": ".chatmessagecontentitemvideo",
|
||||
"ChatMessageContentItemVideoVideoURLTypedDict": ".chatmessagecontentitemvideo",
|
||||
"VideoURL1": ".chatmessagecontentitemvideo",
|
||||
"VideoURL1TypedDict": ".chatmessagecontentitemvideo",
|
||||
"VideoURL2": ".chatmessagecontentitemvideo",
|
||||
"VideoURL2TypedDict": ".chatmessagecontentitemvideo",
|
||||
"ChatMessageContentItemVideoVideoURLVideoURL": ".chatmessagecontentitemvideo",
|
||||
"ChatMessageContentItemVideoVideoURLVideoURLTypedDict": ".chatmessagecontentitemvideo",
|
||||
"ChatMessageTokenLogprob": ".chatmessagetokenlogprob",
|
||||
"ChatMessageTokenLogprobTypedDict": ".chatmessagetokenlogprob",
|
||||
"TopLogprob": ".chatmessagetokenlogprob",
|
||||
@@ -1987,6 +1998,8 @@ _dynamic_imports: dict[str, str] = {
|
||||
"UserMessageContent": ".usermessage",
|
||||
"UserMessageContentTypedDict": ".usermessage",
|
||||
"UserMessageTypedDict": ".usermessage",
|
||||
"VideoURL": ".videourl",
|
||||
"VideoURLTypedDict": ".videourl",
|
||||
"WebSearchPreviewToolUserLocation": ".websearchpreviewtooluserlocation",
|
||||
"WebSearchPreviewToolUserLocationType": ".websearchpreviewtooluserlocation",
|
||||
"WebSearchPreviewToolUserLocationTypedDict": ".websearchpreviewtooluserlocation",
|
||||
|
||||
@@ -5,6 +5,10 @@ from .chatmessagecontentitemaudio import (
|
||||
ChatMessageContentItemAudio,
|
||||
ChatMessageContentItemAudioTypedDict,
|
||||
)
|
||||
from .chatmessagecontentitemfile import (
|
||||
ChatMessageContentItemFile,
|
||||
ChatMessageContentItemFileTypedDict,
|
||||
)
|
||||
from .chatmessagecontentitemimage import (
|
||||
ChatMessageContentItemImage,
|
||||
ChatMessageContentItemImageTypedDict,
|
||||
@@ -29,6 +33,7 @@ ChatMessageContentItemTypedDict = TypeAliasType(
|
||||
ChatMessageContentItemTextTypedDict,
|
||||
ChatMessageContentItemImageTypedDict,
|
||||
ChatMessageContentItemAudioTypedDict,
|
||||
ChatMessageContentItemFileTypedDict,
|
||||
ChatMessageContentItemVideoTypedDict,
|
||||
],
|
||||
)
|
||||
@@ -41,6 +46,7 @@ ChatMessageContentItem = Annotated[
|
||||
Annotated[ChatMessageContentItemAudio, Tag("input_audio")],
|
||||
Annotated[ChatMessageContentItemVideo, Tag("input_video")],
|
||||
Annotated[ChatMessageContentItemVideo, Tag("video_url")],
|
||||
Annotated[ChatMessageContentItemFile, Tag("file")],
|
||||
],
|
||||
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import validate_const
|
||||
import pydantic
|
||||
from pydantic.functional_validators import AfterValidator
|
||||
from typing import Literal, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class FileTypedDict(TypedDict):
|
||||
file_data: str
|
||||
file_id: NotRequired[str]
|
||||
filename: NotRequired[str]
|
||||
|
||||
|
||||
class File(BaseModel):
|
||||
file_data: str
|
||||
|
||||
file_id: Optional[str] = None
|
||||
|
||||
filename: Optional[str] = None
|
||||
|
||||
|
||||
class ChatMessageContentItemFileTypedDict(TypedDict):
|
||||
file: FileTypedDict
|
||||
type: Literal["file"]
|
||||
|
||||
|
||||
class ChatMessageContentItemFile(BaseModel):
|
||||
file: File
|
||||
|
||||
TYPE: Annotated[
|
||||
Annotated[Literal["file"], AfterValidator(validate_const("file"))],
|
||||
pydantic.Field(alias="type"),
|
||||
] = "file"
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from .videourl import VideoURL, VideoURLTypedDict
|
||||
from openrouter.types import BaseModel
|
||||
from openrouter.utils import validate_const
|
||||
import pydantic
|
||||
@@ -9,21 +10,21 @@ from typing import Literal, Union
|
||||
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
||||
|
||||
|
||||
class VideoURL2TypedDict(TypedDict):
|
||||
class ChatMessageContentItemVideoVideoURLVideoURLTypedDict(TypedDict):
|
||||
url: str
|
||||
|
||||
|
||||
class VideoURL2(BaseModel):
|
||||
class ChatMessageContentItemVideoVideoURLVideoURL(BaseModel):
|
||||
url: str
|
||||
|
||||
|
||||
class ChatMessageContentItemVideoVideoURLTypedDict(TypedDict):
|
||||
video_url: VideoURL2TypedDict
|
||||
video_url: ChatMessageContentItemVideoVideoURLVideoURLTypedDict
|
||||
type: Literal["video_url"]
|
||||
|
||||
|
||||
class ChatMessageContentItemVideoVideoURL(BaseModel):
|
||||
video_url: VideoURL2
|
||||
video_url: ChatMessageContentItemVideoVideoURLVideoURL
|
||||
|
||||
TYPE: Annotated[
|
||||
Annotated[Literal["video_url"], AfterValidator(validate_const("video_url"))],
|
||||
@@ -31,21 +32,13 @@ class ChatMessageContentItemVideoVideoURL(BaseModel):
|
||||
] = "video_url"
|
||||
|
||||
|
||||
class VideoURL1TypedDict(TypedDict):
|
||||
url: str
|
||||
|
||||
|
||||
class VideoURL1(BaseModel):
|
||||
url: str
|
||||
|
||||
|
||||
class ChatMessageContentItemVideoInputVideoTypedDict(TypedDict):
|
||||
video_url: VideoURL1TypedDict
|
||||
video_url: VideoURLTypedDict
|
||||
type: Literal["input_video"]
|
||||
|
||||
|
||||
class ChatMessageContentItemVideoInputVideo(BaseModel):
|
||||
video_url: VideoURL1
|
||||
video_url: VideoURL
|
||||
|
||||
TYPE: Annotated[
|
||||
Annotated[
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.types import BaseModel
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
|
||||
class VideoURLTypedDict(TypedDict):
|
||||
url: str
|
||||
|
||||
|
||||
class VideoURL(BaseModel):
|
||||
url: str
|
||||
Reference in New Issue
Block a user