mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-10 05:24:39 +00:00
Merge 376eb94def
into d266c59c2a
This commit is contained in:
commit
7774d9e9f3
80 changed files with 32197 additions and 186 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue