-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
System Info
Python 3.12.11
Information
- The official example scripts
- My own modified scripts
🐛 Describe the bug
When running the tests for openai_embeddings with nvidia/llama-3.2-nv-embedqa-1b-v2
with https://integrate.api.nvidia.com
base URL, I got the following error:
openai.BadRequestError: Error code: 400 - {'error': "Your request cannot be validated, it is incorrect. detail='input_type' parameter is required for asymmetric models"}
This is because the openai_embeddings method does not have the input_type
parameter, but the asymmetric models need the input_type
parameter for embeddings.
Error logs
Here is the error log from one of the test cases in test_openai_embeddings
:
_ test_openai_embeddings_base64_batch_processing[llama_stack_client-emb=nvidia/llama-3.2-nv-embedqa-1b-v2] _
tests/integration/inference/test_openai_embeddings.py:253: in test_openai_embeddings_base64_batch_processing
response = compat_client.embeddings.create(
.venv/lib/python3.12/site-packages/llama_stack_client/resources/embeddings.py:89: in create
return self._post(
.venv/lib/python3.12/site-packages/llama_stack_client/_base_client.py:1232: in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
llama_stack/distribution/library_client.py:198: in request
result = loop.run_until_complete(self.async_client.request(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../miniconda3/envs/llama/lib/python3.12/asyncio/base_events.py:691: in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
llama_stack/distribution/library_client.py:312: in request
response = await self._call_non_streaming(
llama_stack/distribution/library_client.py:364: in _call_non_streaming
result = await matched_func(**body)
^^^^^^^^^^^^^^^^^^^^^^^^^^
llama_stack/providers/utils/telemetry/trace_protocol.py:101: in async_wrapper
result = await method(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
llama_stack/distribution/routers/inference.py:580: in openai_embeddings
return await provider.openai_embeddings(**params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
llama_stack/providers/utils/inference/openai_mixin.py:226: in openai_embeddings
response = await self.client.embeddings.create(
.venv/lib/python3.12/site-packages/openai/resources/embeddings.py:243: in create
return await self._post(
.venv/lib/python3.12/site-packages/openai/_base_client.py:1767: in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.12/site-packages/openai/_base_client.py:1461: in request
return await self._request(
.venv/lib/python3.12/site-packages/openai/_base_client.py:1562: in _request
raise self._make_status_error_from_response(err.response) from None
E openai.BadRequestError: Error code: 400 - {'error': "Your request cannot be validated, it is incorrect. detail='input_type' parameter is required for asymmetric models"}
Expected behavior
Expect to either have openai_embeddings
method support the input_type
parameter, or document that the method does not support asymmetric embedding method.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working