mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
Project import generated by Copybara.
GitOrigin-RevId: 2592bdc8b4b7c695a3d689390aedc9a42914acc8
This commit is contained in:
@@ -50,6 +50,8 @@ class ModelTypedDict(TypedDict):
|
||||
r"""Hugging Face model identifier, if applicable"""
|
||||
description: NotRequired[str]
|
||||
r"""Description of the model"""
|
||||
expiration_date: NotRequired[Nullable[str]]
|
||||
r"""The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration."""
|
||||
|
||||
|
||||
class Model(BaseModel):
|
||||
@@ -96,14 +98,18 @@ class Model(BaseModel):
|
||||
description: Optional[str] = None
|
||||
r"""Description of the model"""
|
||||
|
||||
expiration_date: OptionalNullable[str] = UNSET
|
||||
r"""The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration."""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = ["hugging_face_id", "description"]
|
||||
optional_fields = ["hugging_face_id", "description", "expiration_date"]
|
||||
nullable_fields = [
|
||||
"hugging_face_id",
|
||||
"context_length",
|
||||
"per_request_limits",
|
||||
"default_parameters",
|
||||
"expiration_date",
|
||||
]
|
||||
null_default_fields = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user