mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
bug fix - issue 277
This commit is contained in:
parent
3e5c972e91
commit
8f5e2d0013
2 changed files with 1 additions and 2 deletions
|
@ -184,6 +184,7 @@ def test_completion_cohere_stream():
|
||||||
|
|
||||||
def test_completion_openai():
|
def test_completion_openai():
|
||||||
try:
|
try:
|
||||||
|
litellm.api_key = os.environ['OPENAI_API_KEY']
|
||||||
response = completion(model="gpt-3.5-turbo", messages=messages)
|
response = completion(model="gpt-3.5-turbo", messages=messages)
|
||||||
|
|
||||||
response_str = response["choices"][0]["message"]["content"]
|
response_str = response["choices"][0]["message"]["content"]
|
||||||
|
|
|
@ -1977,8 +1977,6 @@ def get_secret(secret_name):
|
||||||
except:
|
except:
|
||||||
secret = None
|
secret = None
|
||||||
return secret
|
return secret
|
||||||
elif litellm.api_key != None: # if users use litellm default key
|
|
||||||
return litellm.api_key
|
|
||||||
else:
|
else:
|
||||||
return os.environ.get(secret_name)
|
return os.environ.get(secret_name)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue