Back to Langchain4j

Chroma

docs/docs/integrations/embedding-stores/chroma.md

1.14.01.3 KB
Original Source

Chroma

https://www.trychroma.com/

Maven Dependency

xml
<dependency>
    <groupId>dev.langchain4j</groupId>
    <artifactId>langchain4j-chroma</artifactId>
    <version>1.13.1-beta23</version>
</dependency>

APIs

  • ChromaEmbeddingStore

Examples

Supported API Versions

Chroma has multiple REST API versions:

  • until version 0.5.16: only API V1 is supported
  • versions 0.5.16 to 0.6.3: API V1 and V2 are supported (there are some bugs in V1 API introduced around 0.6.2)
  • versions after 0.7.0: only API V2 is supported, so you need to select the proper version when configuring the ChromaEmbeddingStore:
java
ChromaEmbeddingStore.builder()
    .apiVersion(ChromaApiVersion.V2)
    .baseUrl(...)
    .tenantName(...)
    .databaseName(...)
    .collectionName(...)
    .build();

Current Limitations

  • Chroma cannot filter by greater and less than of alphanumeric metadata, only int and float are supported
  • Chroma filters by not as following: if you filter by "key" not equals "a", then in fact all items with "key" != "a" value are returned, but no items without "key" metadata!