mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
133 lines
4.5 KiB
Python
133 lines
4.5 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from openrouter.components import (
|
|
listguardrailsresponse as components_listguardrailsresponse,
|
|
)
|
|
from openrouter.types import BaseModel
|
|
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
|
import pydantic
|
|
from typing import Awaitable, Callable, Optional, Union
|
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
|
|
|
|
class ListGuardrailsGlobalsTypedDict(TypedDict):
|
|
http_referer: NotRequired[str]
|
|
r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
This is used to track API usage per application.
|
|
|
|
"""
|
|
x_open_router_title: NotRequired[str]
|
|
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
|
|
"""
|
|
x_open_router_categories: NotRequired[str]
|
|
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
|
|
|
"""
|
|
|
|
|
|
class ListGuardrailsGlobals(BaseModel):
|
|
http_referer: Annotated[
|
|
Optional[str],
|
|
pydantic.Field(alias="HTTP-Referer"),
|
|
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
] = None
|
|
r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
This is used to track API usage per application.
|
|
|
|
"""
|
|
|
|
x_open_router_title: Annotated[
|
|
Optional[str],
|
|
pydantic.Field(alias="X-OpenRouter-Title"),
|
|
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
] = None
|
|
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
|
|
"""
|
|
|
|
x_open_router_categories: Annotated[
|
|
Optional[str],
|
|
pydantic.Field(alias="X-OpenRouter-Categories"),
|
|
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
] = None
|
|
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
|
|
|
"""
|
|
|
|
|
|
class ListGuardrailsRequestTypedDict(TypedDict):
|
|
http_referer: NotRequired[str]
|
|
r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
This is used to track API usage per application.
|
|
|
|
"""
|
|
x_open_router_title: NotRequired[str]
|
|
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
|
|
"""
|
|
x_open_router_categories: NotRequired[str]
|
|
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
|
|
|
"""
|
|
offset: NotRequired[int]
|
|
r"""Number of records to skip for pagination"""
|
|
limit: NotRequired[int]
|
|
r"""Maximum number of records to return (max 100)"""
|
|
|
|
|
|
class ListGuardrailsRequest(BaseModel):
|
|
http_referer: Annotated[
|
|
Optional[str],
|
|
pydantic.Field(alias="HTTP-Referer"),
|
|
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
] = None
|
|
r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
This is used to track API usage per application.
|
|
|
|
"""
|
|
|
|
x_open_router_title: Annotated[
|
|
Optional[str],
|
|
pydantic.Field(alias="X-OpenRouter-Title"),
|
|
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
] = None
|
|
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
|
|
"""
|
|
|
|
x_open_router_categories: Annotated[
|
|
Optional[str],
|
|
pydantic.Field(alias="X-OpenRouter-Categories"),
|
|
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
] = None
|
|
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
|
|
|
"""
|
|
|
|
offset: Annotated[
|
|
Optional[int],
|
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
] = None
|
|
r"""Number of records to skip for pagination"""
|
|
|
|
limit: Annotated[
|
|
Optional[int],
|
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
] = None
|
|
r"""Maximum number of records to return (max 100)"""
|
|
|
|
|
|
class ListGuardrailsResponseTypedDict(TypedDict):
|
|
result: components_listguardrailsresponse.ListGuardrailsResponseTypedDict
|
|
|
|
|
|
class ListGuardrailsResponse(BaseModel):
|
|
next: Union[
|
|
Callable[[], Optional[ListGuardrailsResponse]],
|
|
Callable[[], Awaitable[Optional[ListGuardrailsResponse]]],
|
|
]
|
|
|
|
result: components_listguardrailsresponse.ListGuardrailsResponse
|