new test for deep infra

This commit is contained in:
ishaan-jaff 2023-09-26 13:15:39 -07:00
parent 43da1d7a55
commit a364b36f9e
2 changed files with 30 additions and 2 deletions

View file

@ -882,8 +882,7 @@ def test_completion_deep_infra():
print(response.response_ms)
except Exception as e:
pytest.fail(f"Error occurred: {e}")
# test_completion_deep_infra()
# Palm tests
def test_completion_palm():
# litellm.set_verbose = True

View file

@ -426,6 +426,35 @@ def test_completion_palm_stream():
pytest.fail(f"Error occurred: {e}")
# test_completion_palm_stream()
# def test_completion_deep_infra_stream():
# # deep infra currently includes role in the 2nd chunk
# # waiting for them to make a fix on this
# try:
# messages = [
# {"role": "system", "content": "You are a helpful assistant."},
# {
# "role": "user",
# "content": "how does a court case get to the Supreme Court?",
# },
# ]
# print("testing deep infra streaming")
# response = completion(
# model="deepinfra/meta-llama/Llama-2-70b-chat-hf", messages=messages, stream=True, max_tokens=80
# )
# complete_response = ""
# # Add any assertions here to check the response
# 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")
# print(f"completion_response: {complete_response}")
# except Exception as e:
# pytest.fail(f"Error occurred: {e}")
# test_completion_deep_infra_stream()
def test_completion_claude_stream_bad_key():
try: