mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +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():
|
||||
try:
|
||||
litellm.api_key = os.environ['OPENAI_API_KEY']
|
||||
response = completion(model="gpt-3.5-turbo", messages=messages)
|
||||
|
||||
response_str = response["choices"][0]["message"]["content"]
|
||||
|
|
|
@ -1977,8 +1977,6 @@ def get_secret(secret_name):
|
|||
except:
|
||||
secret = None
|
||||
return secret
|
||||
elif litellm.api_key != None: # if users use litellm default key
|
||||
return litellm.api_key
|
||||
else:
|
||||
return os.environ.get(secret_name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue