fix: default API key to EMPTY for local endpoints
This commit is contained in:
parent
5fdf75e349
commit
eb0309baad
@ -47,9 +47,8 @@ class OpenAICompatibleAPI(ModelAPI):
|
||||
config=config,
|
||||
)
|
||||
|
||||
# use service prefix to lookup api_key
|
||||
self.api_key = api_key or os.environ.get('EVALSCOPE_API_KEY', None)
|
||||
assert self.api_key, f'API key for {model_name} not found'
|
||||
# use service prefix to lookup api_key; default to 'EMPTY' for local endpoints
|
||||
self.api_key = api_key or os.environ.get('EVALSCOPE_API_KEY') or 'EMPTY'
|
||||
|
||||
# use service prefix to lookup base_url
|
||||
self.base_url = base_url or os.environ.get('EVALSCOPE_BASE_URL', None)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user