forked from phoenix/litellm-mirror
(test) Added completion and embedding tests for watsonx provider
This commit is contained in:
parent
f9a7456eaa
commit
9fc30e8b31
3 changed files with 73 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue