forked from phoenix/litellm-mirror
allow setting litellm.api_key
This commit is contained in:
parent
fe32ddeaba
commit
f5b6c04de4
3 changed files with 4 additions and 3 deletions
|
@ -717,10 +717,10 @@ def get_secret(secret_name):
|
|||
# if secret manager fails default to using .env variables
|
||||
os.environ[secret_name] = secret # set to env to be safe
|
||||
return secret
|
||||
elif litellm.api_key != None: # if users use litellm default key
|
||||
return litellm.api_key
|
||||
else:
|
||||
return os.environ.get(secret_name)
|
||||
else:
|
||||
return os.environ.get(secret_name)
|
||||
|
||||
######## Streaming Class ############################
|
||||
# wraps the completion stream to return the correct format for the model
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue