Continue fixing the issue #2832: Add protected_namespaces to another to Config class within the router.py

This commit is contained in:
unclecode 2024-04-08 12:49:40 +08:00
parent 1ace192155
commit 5554e2c359

View file

@ -12,6 +12,9 @@ class ModelConfig(BaseModel):
tpm: int
rpm: int
class Config:
protected_namespaces = ()
class RouterConfig(BaseModel):
model_list: List[ModelConfig]
@ -144,7 +147,7 @@ class Deployment(BaseModel):
class Config:
extra = "allow"
protected_namespaces = ()
def __contains__(self, key):
# Define custom behavior for the 'in' operator
return hasattr(self, key)