spring-ai icon indicating copy to clipboard operation
spring-ai copied to clipboard

Correctly set Chroma collection id when initializeSchema set to false

Open alexcheng1982 opened this issue 1 year ago • 0 comments
trafficstars

In the current implementation of ChromaVectorStore, when initializeSchema is set to false, collectionId will be set to null, all Chroma API calls will fail with 404 error due to empty collection id.

I updated the logic of handling initializeSchema. When the collection doesn't exist, if initializeSchema is set to true, the collection will be created. Otherwise, an exception is thrown. This makes sure that collectionId will be correctly set.

alexcheng1982 avatar Sep 30 '24 12:09 alexcheng1982