forked from phoenix/litellm-mirror
(test) fix test test_exception_tracking
This commit is contained in:
parent
9c70da56df
commit
ad2b75a8cc
1 changed files with 2 additions and 0 deletions
|
@ -14,6 +14,7 @@ import time
|
||||||
def test_exception_tracking():
|
def test_exception_tracking():
|
||||||
print('expect this to fail and log to sentry')
|
print('expect this to fail and log to sentry')
|
||||||
litellm.set_verbose=True
|
litellm.set_verbose=True
|
||||||
|
old_api_key = os.environ["OPENAI_API_KEY"]
|
||||||
os.environ["OPENAI_API_KEY"] = "ss"
|
os.environ["OPENAI_API_KEY"] = "ss"
|
||||||
try:
|
try:
|
||||||
response = completion(model="gpt-3.5-turbo",
|
response = completion(model="gpt-3.5-turbo",
|
||||||
|
@ -25,6 +26,7 @@ def test_exception_tracking():
|
||||||
temperature=0.2
|
temperature=0.2
|
||||||
)
|
)
|
||||||
print(response)
|
print(response)
|
||||||
|
os.environ["OPENAI_API_KEY"] = old_api_key
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("got_exception")
|
print("got_exception")
|
||||||
print(e)
|
print(e)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue