diff --git a/llmebench/models/FastChat.py b/llmebench/models/FastChat.py index 7aa45668..52579352 100644 --- a/llmebench/models/FastChat.py +++ b/llmebench/models/FastChat.py @@ -5,18 +5,18 @@ class FastChatModel(OpenAIModel): def __init__(self, api_base=None, api_key=None, model_name=None, **kwargs): - self.api_base = api_base or os.getenv("OPENAI_API_BASE") - self.api_key = api_key or os.getenv("OPENAI_API_KEY") - self.model_name = model_name or os.getenv("OPENAI_MODEL") - if self.api_base is None: + api_base = api_base or os.getenv("OPENAI_API_BASE") + api_key = api_key or os.getenv("OPENAI_API_KEY") + model_name = model_name or os.getenv("OPENAI_MODEL") + if api_base is None: raise Exception( "API url must be provided as model config or environment variable (`OPENAI_API_BASE`)" ) - if self.api_key is None: + if api_key is None: raise Exception( "API url must be provided as model config or environment variable (`OPENAI_API_KEY`)" ) - if self.model_name is None: + if model_name is None: raise Exception( "API url must be provided as model config or environment variable (`OPENAI_MODEL`)" )