mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-01 12:40:23 +08:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.617.1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from dataclasses import dataclass, field
|
||||
import httpx
|
||||
from openrouter.errors import OpenRouterError
|
||||
from openrouter.models import chatcompletionerror as models_chatcompletionerror
|
||||
@@ -13,10 +14,11 @@ class ChatCompletionErrorData(BaseModel):
|
||||
r"""Error object structure"""
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ChatCompletionError(OpenRouterError):
|
||||
r"""Chat completion error response"""
|
||||
|
||||
data: ChatCompletionErrorData
|
||||
data: ChatCompletionErrorData = field(hash=False)
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -27,4 +29,4 @@ class ChatCompletionError(OpenRouterError):
|
||||
fallback = body or raw_response.text
|
||||
message = str(data.error.message) or fallback
|
||||
super().__init__(message, raw_response, body)
|
||||
self.data = data
|
||||
object.__setattr__(self, "data", data)
|
||||
|
||||
Reference in New Issue
Block a user