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
Wha the example demonstrates is that if the EF is provided a string or a list of strings, it will happily accept the input and generate seemingly valid embeddings.
This behavior is not limited to our default EF. Here's a list that I tested so far:
OpenAIEmbeddingFunction
SentenceTransformerEmbeddingFunction
GoogleGenerativeAiEmbeddingFunction
Contrary to the above:
Ollama - works fine with single string and list of strings as this is supported by the API
HuggingFace inference API - same as ollama (although this is not in the official docs, experiments show that API supports both types of inputs)
Cohere - properly validates the input and fails with UnprocessableEntityError: status_code: 422, body: {'message': 'invalid type: parameter texts is of type string but should be of type []Object. For proper usage, please refer to https://docs.cohere.com/v1/reference/embed'}
Versions
Chroma 0.4.x-0.6.x
Relevant log output
The text was updated successfully, but these errors were encountered:
What happened?
Many of our embedding function input validations are not strong enough causing misleading and confusing results.
Consider the following:
In the above all, but the last assertion will pass:
Wha the example demonstrates is that if the EF is provided a string or a list of strings, it will happily accept the input and generate seemingly valid embeddings.
This behavior is not limited to our default EF. Here's a list that I tested so far:
OpenAIEmbeddingFunction
SentenceTransformerEmbeddingFunction
GoogleGenerativeAiEmbeddingFunction
Contrary to the above:
UnprocessableEntityError: status_code: 422, body: {'message': 'invalid type: parameter texts is of type string but should be of type []Object. For proper usage, please refer to https://docs.cohere.com/v1/reference/embed'}
Versions
Chroma 0.4.x-0.6.x
Relevant log output
The text was updated successfully, but these errors were encountered: