You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a validation error when using bedrock for embedding:
botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: Malformed input request: #: required key [texts] not found#: required key [input_type] not found#: extraneous key [inputText] is not permitted, please reformat your input and try again
this is the code snippet:
`embedding_function = embedding_functions.AmazonBedrockEmbeddingFunction(session=session, model_name="cohere.embed-english-v3")
collection = persistent_client.get_or_create_collection("c_data", embedding_function=embedding_function)
full error: File "main.py", line 188, in load_data_to_db collection.add( File "/usr/local/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 154, in add embeddings = self._embed(input=documents) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 633, in _embed return self._embedding_function(input=input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/utils/embedding_functions.py", line 751, in __call__ response = self._client.invoke_model( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/botocore/client.py", line 553, in _api_call return self._make_api_call(operation_name, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/botocore/client.py", line 1015, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: Malformed input request: #: required key [texts] not found#: required key [input_type] not found#: extraneous key [inputText] is not permitted, please reformat your input and try again.
Versions
chroma v[0.4.22]
Python 3.11.6
boto3 Version: 1.34.23
OS: Mac M1 Pro
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
What happened?
I'm getting a validation error when using bedrock for embedding:
botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: Malformed input request: #: required key [texts] not found#: required key [input_type] not found#: extraneous key [inputText] is not permitted, please reformat your input and try again
this is the code snippet:
`embedding_function = embedding_functions.AmazonBedrockEmbeddingFunction(session=session, model_name="cohere.embed-english-v3")
collection = persistent_client.get_or_create_collection("c_data", embedding_function=embedding_function)
load txt files
full error:
File "main.py", line 188, in load_data_to_db collection.add( File "/usr/local/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 154, in add embeddings = self._embed(input=documents) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 633, in _embed return self._embedding_function(input=input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/chromadb/utils/embedding_functions.py", line 751, in __call__ response = self._client.invoke_model( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/botocore/client.py", line 553, in _api_call return self._make_api_call(operation_name, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/botocore/client.py", line 1015, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: Malformed input request: #: required key [texts] not found#: required key [input_type] not found#: extraneous key [inputText] is not permitted, please reformat your input and try again.
Versions
chroma v[0.4.22]
Python 3.11.6
boto3 Version: 1.34.23
OS: Mac M1 Pro
Relevant log output
No response
The text was updated successfully, but these errors were encountered: