fix warning for pydantic 2

This commit is contained in:
Tim Shih 2023-12-01 10:37:14 +08:00
parent ccd5725a0c
commit 75e8521eb9

View File

@ -243,5 +243,11 @@ class StreamResponse(BaseModel):
# Inference API currently deployed model # Inference API currently deployed model
class DeployedModel(BaseModel): class DeployedModel(BaseModel):
model_config = {
# Pydantic 2 sets `model_` prefix as protected namespace and raises a
# warning when this model is loaded. Set this option to disable the warning.
"protected_namespaces": (),
}
model_id: str model_id: str
sha: str sha: str