This commit is contained in:
IAN MILLER 2025-10-03 04:57:49 -07:00 committed by GitHub
commit 7774d9e9f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
80 changed files with 32197 additions and 186 deletions

View file

@ -104,7 +104,9 @@ def test_openai_embeddings_single_string(compat_client, client_with_models, embe
)
assert response.object == "list"
assert response.model == embedding_model_id
# Handle provider-scoped model identifiers (e.g., sentence-transformers/nomic-ai/nomic-embed-text-v1.5)
assert response.model == embedding_model_id or response.model.endswith(f"/{embedding_model_id}")
assert len(response.data) == 1
assert response.data[0].object == "embedding"
assert response.data[0].index == 0
@ -126,7 +128,9 @@ def test_openai_embeddings_multiple_strings(compat_client, client_with_models, e
)
assert response.object == "list"
assert response.model == embedding_model_id
# Handle provider-scoped model identifiers (e.g., sentence-transformers/nomic-ai/nomic-embed-text-v1.5)
assert response.model == embedding_model_id or response.model.endswith(f"/{embedding_model_id}")
assert len(response.data) == len(input_texts)
for i, embedding_data in enumerate(response.data):
@ -293,7 +297,9 @@ def test_openai_embeddings_base64_batch_processing(compat_client, client_with_mo
)
# Validate response structure
assert response.object == "list"
assert response.model == embedding_model_id
# Handle provider-scoped model identifiers (e.g., sentence-transformers/nomic-ai/nomic-embed-text-v1.5)
assert response.model == embedding_model_id or response.model.endswith(f"/{embedding_model_id}")
assert len(response.data) == len(input_texts)
# Validate each embedding in the batch