bump version + check_valid_key

This commit is contained in:
ishaan-jaff 2023-09-12 11:56:04 -07:00
parent 0bd5822a97
commit 7d5f3c48c6
2 changed files with 10 additions and 17 deletions

View file

@ -83,20 +83,13 @@ def test_get_valid_models():
# test_get_valid_models()
# def test_bad_key():
# key = "bad-key"
# response = check_valid_key(key)
# if response == False:
# pass
# else:
# raise Exception("Bad key was not detected")
# test_bad_key()
def test_bad_key():
key = "bad-key"
response = check_valid_key(model="gpt-3.5-turbo", api_key=key)
print(response, key)
assert(response == False)
# def test_good_key():
# key = os.environ['OPENAI_API_KEY']
# response = check_valid_key(key)
# if response == True:
# pass
# else:
# raise Exception("Good key did not pass")
# test_good_key()
def test_good_key():
key = os.environ['OPENAI_API_KEY']
response = check_valid_key(model="gpt-3.5-turbo", api_key=key)
assert(response == True)