(test) dimension param - openai

This commit is contained in:
ishaan-jaff 2024-01-26 10:37:01 -08:00
parent c8da57710f
commit 17370dc50f

View file

@ -64,7 +64,9 @@ def test_openai_embedding_3():
model="text-embedding-3-small", model="text-embedding-3-small",
input=["good morning from litellm", "this is another item"], input=["good morning from litellm", "this is another item"],
metadata={"anything": "good day"}, metadata={"anything": "good day"},
dimensions=5,
) )
print(f"response:", response)
litellm_response = dict(response) litellm_response = dict(response)
litellm_response_keys = set(litellm_response.keys()) litellm_response_keys = set(litellm_response.keys())
litellm_response_keys.discard("_response_ms") litellm_response_keys.discard("_response_ms")
@ -80,6 +82,7 @@ def test_openai_embedding_3():
response = client.embeddings.create( response = client.embeddings.create(
model="text-embedding-3-small", model="text-embedding-3-small",
input=["good morning from litellm", "this is another item"], input=["good morning from litellm", "this is another item"],
dimensions=5,
) )
response = dict(response) response = dict(response)