(test) Added completion and embedding tests for watsonx provider

This commit is contained in:
Simon Sanchez Viloria 2024-04-24 12:52:29 +02:00
parent f9a7456eaa
commit 9fc30e8b31
3 changed files with 73 additions and 0 deletions

View file

@ -483,6 +483,18 @@ def test_mistral_embeddings():
except Exception as e:
pytest.fail(f"Error occurred: {e}")
def test_watsonx_embeddings():
try:
litellm.set_verbose = True
response = litellm.embedding(
model="watsonx/ibm/slate-30m-english-rtrvr",
input=["good morning from litellm"],
)
print(f"response: {response}")
assert isinstance(response.usage, litellm.Usage)
except Exception as e:
pytest.fail(f"Error occurred: {e}")
# test_mistral_embeddings()