mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-29 03:14:19 +00:00
fix for model in OpenAIEmbeddingsResponse and rebase
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
15042c6c31
commit
179399edf4
2 changed files with 9 additions and 1 deletions
|
@ -55,6 +55,12 @@ def skip_if_model_doesnt_support_openai_embeddings(client, model_id):
|
|||
pytest.skip(f"Model {model_id} hosted by {provider.provider_type} doesn't support OpenAI embeddings.")
|
||||
|
||||
|
||||
def skip_if_client_doesnt_support_base64_encoding(client, model_id):
|
||||
provider = provider_from_model(client, model_id)
|
||||
if provider.provider_type in ("remote::ollama",):
|
||||
pytest.skip(f"Client {client} doesn't support base64 encoding for embeddings.")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def openai_client(client_with_models):
|
||||
base_url = f"{client_with_models.base_url}/v1/openai/v1"
|
||||
|
@ -247,6 +253,7 @@ def test_openai_embeddings_with_encoding_format_base64(compat_client, client_wit
|
|||
def test_openai_embeddings_base64_batch_processing(compat_client, client_with_models, embedding_model_id):
|
||||
"""Test OpenAI embeddings endpoint with base64 encoding for batch processing."""
|
||||
skip_if_model_doesnt_support_openai_embeddings(client_with_models, embedding_model_id)
|
||||
skip_if_client_doesnt_support_base64_encoding(client_with_models, embedding_model_id)
|
||||
|
||||
input_texts = ["First text for base64", "Second text for base64", "Third text for base64"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue