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,
|
config=config,
|
||||||
)
|
)
|
||||||
|
|
||||||
# use service prefix to lookup api_key
|
# 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', None)
|
self.api_key = api_key or os.environ.get('EVALSCOPE_API_KEY') or 'EMPTY'
|
||||||
assert self.api_key, f'API key for {model_name} not found'
|
|
||||||
|
|
||||||
# use service prefix to lookup base_url
|
# use service prefix to lookup base_url
|
||||||
self.base_url = base_url or os.environ.get('EVALSCOPE_BASE_URL', None)
|
self.base_url = base_url or os.environ.get('EVALSCOPE_BASE_URL', None)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user