mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-01 12:40:23 +08:00
## Python SDK Changes:
* `open_router.beta.responses.send()`: `request` **Changed** **Breaking** ⚠️ * `open_router.embeddings.generate()`: `response.status[200].content[text/event-stream` **Removed** **Breaking** ⚠️ * `open_router.chat.send()`: * `request` **Changed** **Breaking** ⚠️ * `response.choices.[].message.content.[array].[]` **Changed** **Breaking** ⚠️ * `open_router.credits.get_credits()`: `response.data` **Added** * `open_router.parameters.get_parameters()`: `request.provider` **Changed** * `open_router.completions.generate()`: `response` **Changed**
This commit is contained in:
@@ -10,8 +10,10 @@ from .responsesformattextjsonschemaconfig import (
|
||||
ResponsesFormatTextJSONSchemaConfig,
|
||||
ResponsesFormatTextJSONSchemaConfigTypedDict,
|
||||
)
|
||||
from openrouter.utils import get_discriminator
|
||||
from pydantic import Discriminator, Tag
|
||||
from typing import Union
|
||||
from typing_extensions import TypeAliasType
|
||||
from typing_extensions import Annotated, TypeAliasType
|
||||
|
||||
|
||||
ResponseFormatTextConfigTypedDict = TypeAliasType(
|
||||
@@ -25,12 +27,12 @@ ResponseFormatTextConfigTypedDict = TypeAliasType(
|
||||
r"""Text response format configuration"""
|
||||
|
||||
|
||||
ResponseFormatTextConfig = TypeAliasType(
|
||||
"ResponseFormatTextConfig",
|
||||
ResponseFormatTextConfig = Annotated[
|
||||
Union[
|
||||
ResponsesFormatText,
|
||||
ResponsesFormatJSONObject,
|
||||
ResponsesFormatTextJSONSchemaConfig,
|
||||
Annotated[ResponsesFormatText, Tag("text")],
|
||||
Annotated[ResponsesFormatJSONObject, Tag("json_object")],
|
||||
Annotated[ResponsesFormatTextJSONSchemaConfig, Tag("json_schema")],
|
||||
],
|
||||
)
|
||||
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
||||
]
|
||||
r"""Text response format configuration"""
|
||||
|
||||
Reference in New Issue
Block a user