forked from phoenix/litellm-mirror
Fix issue #2832: Add protected_namespaces to Config class within utils.py, router.py and completion.py to avoid the warning message.
This commit is contained in:
parent
b4b882c5d6
commit
1ace192155
3 changed files with 6 additions and 2 deletions
|
@ -32,5 +32,5 @@ class CompletionRequest(BaseModel):
|
|||
model_list: Optional[List[str]] = None
|
||||
|
||||
class Config:
|
||||
# allow kwargs
|
||||
extra = "allow"
|
||||
protected_namespaces = ()
|
|
@ -41,6 +41,8 @@ class RouterConfig(BaseModel):
|
|||
"latency-based-routing",
|
||||
] = "simple-shuffle"
|
||||
|
||||
class Config:
|
||||
protected_namespaces = ()
|
||||
|
||||
class ModelInfo(BaseModel):
|
||||
id: Optional[
|
||||
|
@ -141,6 +143,7 @@ class Deployment(BaseModel):
|
|||
|
||||
class Config:
|
||||
extra = "allow"
|
||||
protected_namespaces = ()
|
||||
|
||||
def __contains__(self, key):
|
||||
# Define custom behavior for the 'in' operator
|
||||
|
|
|
@ -236,6 +236,7 @@ class HiddenParams(OpenAIObject):
|
|||
|
||||
class Config:
|
||||
extra = "allow"
|
||||
protected_namespaces = ()
|
||||
|
||||
def get(self, key, default=None):
|
||||
# Custom .get() method to access attributes with a default value if the attribute doesn't exist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue