Update model config in utils.py

This commit is contained in:
lj 2024-05-16 16:39:37 +08:00
parent 2f85a3148e
commit 3620c6fc1a

View file

@ -19,7 +19,7 @@ from functools import wraps, lru_cache
import datetime, time import datetime, time
import tiktoken import tiktoken
import uuid import uuid
from pydantic import BaseModel from pydantic import BaseModel, ConfigDict
import aiohttp import aiohttp
import textwrap import textwrap
import logging import logging
@ -332,9 +332,7 @@ class HiddenParams(OpenAIObject):
model_id: Optional[str] = None # used in Router for individual deployments model_id: Optional[str] = None # used in Router for individual deployments
api_base: Optional[str] = None # returns api base used for making completion call api_base: Optional[str] = None # returns api base used for making completion call
class Config: model_config: ConfigDict = ConfigDict(extra="allow", protected_namespaces=())
extra = "allow"
protected_namespaces = ()
def get(self, key, default=None): def get(self, key, default=None):
# Custom .get() method to access attributes with a default value if the attribute doesn't exist # Custom .get() method to access attributes with a default value if the attribute doesn't exist