mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-02 12:50:48 +08:00
fix: add overlay to remove nullable from pagination offset params (#121)
This commit is contained in:
@@ -21,12 +21,12 @@ ChatResultObject = Literal["chat.completion",]
|
||||
class ChatResultTypedDict(TypedDict):
|
||||
r"""Chat completion response"""
|
||||
|
||||
id: str
|
||||
r"""Unique completion identifier"""
|
||||
choices: List[ChatChoiceTypedDict]
|
||||
r"""List of completion choices"""
|
||||
created: float
|
||||
created: int
|
||||
r"""Unix timestamp of creation"""
|
||||
id: str
|
||||
r"""Unique completion identifier"""
|
||||
model: str
|
||||
r"""Model used for completion"""
|
||||
object: ChatResultObject
|
||||
@@ -41,15 +41,15 @@ class ChatResultTypedDict(TypedDict):
|
||||
class ChatResult(BaseModel):
|
||||
r"""Chat completion response"""
|
||||
|
||||
id: str
|
||||
r"""Unique completion identifier"""
|
||||
|
||||
choices: List[ChatChoice]
|
||||
r"""List of completion choices"""
|
||||
|
||||
created: float
|
||||
created: int
|
||||
r"""Unix timestamp of creation"""
|
||||
|
||||
id: str
|
||||
r"""Unique completion identifier"""
|
||||
|
||||
model: str
|
||||
r"""Model used for completion"""
|
||||
|
||||
@@ -67,7 +67,7 @@ class ChatResult(BaseModel):
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = ["service_tier", "usage"]
|
||||
nullable_fields = ["system_fingerprint", "service_tier"]
|
||||
nullable_fields = ["service_tier", "system_fingerprint"]
|
||||
null_default_fields = []
|
||||
|
||||
serialized = handler(self)
|
||||
|
||||
Reference in New Issue
Block a user