Comments (5)
@habuma, By specification the upsert
endpoint is expected to return a boolean: https://docs.trychroma.com/js_reference/Collection#returns-8
Furthermore the existing IT is successfully verifying this behaviour:
So I'm puzzled by the statement?
(I've confirmed this by using curl to POST documents to the upsert endpoint)
Could it be that we are running different Chroma version (the ITs are based on the chroma:0.4.15)?
from spring-ai.
I'm running 0.4.22. (Started by Spring Boot's Docker Compose support via a docker-compose.yaml).
I just now used curl
to POST a few broken JSON files to the upsert endpoint and get responses like this one:
{"error":"IndexError('list index out of range')"}
(In this case, I had two IDs, but only 1 document and 1 set of embeddings in the body.)
If there's a JSON error (e.g., a missing comma) I get a response like this:
{"detail":[{"type":"json_invalid","loc":["body",21],"msg":"JSON decode error","input":{},"ctx":{"error":"Expecting ',' delimiter"}}]}
But, if the body that I'm posting is correct and if the document is added successfully, I get this:
null
Per the Swagger documentation at http://localhost:8000/docs, the response for a success should be an any
. The response for a validation error should be a JSON response similar to what I show above for a JSON error. (The Swagger doc doesn't mention the other JSON response, but I can assure you that I get it.)
Moreover, what even led me to this was much higher level. I have the following code that exhibits what I'm seeing:
@Bean
ApplicationRunner go(VectorStore vectorStore) {
return args -> {
try {
vectorStore.add(List.of(new Document("99999", "Rich Purnell is a steely eyed missile man.", Map.of("test", "doc"))));
} catch (Exception e) {
System.err.println("Error adding documents: " + e);
// ignore errors because of problem with Chroma vector store
}
};
}
When run, I see this in the console:
Error adding documents: java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because "success" is null
from spring-ai.
Followup: I changed my docker-compose.yaml to force 0.4.15 and I do get true
when a document is successfully upserted. So, something changed between 0.4.15 and 0.4.22.
The comments on chroma-core/chroma#1466 mention this behavior, saying it was introduced in 0.4.16 and suggesting that it is intentional, not a bug.
from spring-ai.
@habuma thanks for clarifying this.
Maybe they did some breaking changes in the API.
Will investigate further with the 0.4.22
from spring-ai.
@habuma i can confirm that Chroma has changed their API, so that the upsert
doesn't return boolean anymore.
Their JS client docs still claims that it is possible , but the Python counterpart suggest None as return value.
Also noticed another change in the getEmbedding as well. The where filter doesn't doesn't support the complex operators (like with the query) but only simple matches.
A fix for the above issues will follow shortly.
from spring-ai.
Related Issues (20)
- Bedrock Titan Embeddings - Malformed input request / 2 validation errors HOT 1
- Generate complex Json schemas with BeanOutputConverter
- MilvusVectorStore need support milvus sdk 'withPartitionName' method when insert or delete
- VectorStoreChatMemoryAdvisor is not working correctly with PGvector
- Why is there no entry for webclient to set up http proxy? I donβt want to set up a proxy for the entire service. π HOT 12
- AWS Bedrock models tools support HOT 2
- Feature Request: Support for Invoking HTTP-based APIs via OpenAPI Spec HOT 1
- Add support for the Amazon Bedrock Converse API HOT 5
- Add Support for get usage tokens HOT 2
- neo4j Vector store does not allow more than 2048 embedding dimensions HOT 1
- SpringAI does not follow the AWS SDK's default region resolution rules HOT 1
- AzureOpenAiChatModel choices is null
- Gemini model doesn't declare dependency on spring-ai-retry
- java.lang.RuntimeException: java.lang.IllegalArgumentException: argument type mismatch
- java.lang.RuntimeException: java.lang.IllegalArgumentException: argument type mismatch
- Get 'The engine PyTorch was not able to initialize' when call TransformersEmbeddingModel's embed method concurrently
- Introduce basic starter dependency for Hugging Face
- odd issue creating embeddings with Ollama HOT 1
- VertexAiGeminiChatModel does not support multiple Function Calls
- Exact similarity match with Redis Vector Store always retuning empty list
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-ai.