mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-28 04:04:31 +00:00
test(test_streaming.py): fix linting errors
This commit is contained in:
parent
1e5929663e
commit
36c99b93c6
1 changed files with 0 additions and 18 deletions
|
@ -768,22 +768,6 @@ def test_completion_replicate_stream_bad_key():
|
||||||
# pytest.fail(f"error occurred: {traceback.format_exc()}")
|
# pytest.fail(f"error occurred: {traceback.format_exc()}")
|
||||||
# test_maritalk_streaming()
|
# test_maritalk_streaming()
|
||||||
# test on openai completion call
|
# test on openai completion call
|
||||||
def test_openai_text_completion_call():
|
|
||||||
try:
|
|
||||||
response = completion(
|
|
||||||
model="text-davinci-003", messages=messages, stream=True, logger_fn=logger_fn
|
|
||||||
)
|
|
||||||
complete_response = ""
|
|
||||||
start_time = time.time()
|
|
||||||
for idx, chunk in enumerate(response):
|
|
||||||
chunk, finished = streaming_format_tests(idx, chunk)
|
|
||||||
if finished:
|
|
||||||
break
|
|
||||||
complete_response += chunk
|
|
||||||
if complete_response.strip() == "":
|
|
||||||
raise Exception("Empty response received")
|
|
||||||
except:
|
|
||||||
pytest.fail(f"error occurred: {traceback.format_exc()}")
|
|
||||||
|
|
||||||
# # test on ai21 completion call
|
# # test on ai21 completion call
|
||||||
def ai21_completion_call():
|
def ai21_completion_call():
|
||||||
|
@ -940,8 +924,6 @@ def test_openai_text_completion_call():
|
||||||
print(f"error occurred: {traceback.format_exc()}")
|
print(f"error occurred: {traceback.format_exc()}")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
test_openai_text_completion_call()
|
|
||||||
|
|
||||||
# # test on together ai completion call - starcoder
|
# # test on together ai completion call - starcoder
|
||||||
def test_together_ai_completion_call_starcoder():
|
def test_together_ai_completion_call_starcoder():
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue