public class ChromaEmbeddingStore extends Object implements EmbeddingStore<TextSegment>
| Modifier and Type | Class and Description |
|---|---|
static class |
ChromaEmbeddingStore.Builder |
| Constructor and Description |
|---|
ChromaEmbeddingStore(String baseUrl,
String collectionName,
Duration timeout)
Initializes a new instance of ChromaEmbeddingStore with the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
String |
add(Embedding embedding) |
String |
add(Embedding embedding,
TextSegment textSegment) |
void |
add(String id,
Embedding embedding) |
List<String> |
addAll(List<Embedding> embeddings) |
List<String> |
addAll(List<Embedding> embeddings,
List<TextSegment> textSegments) |
static ChromaEmbeddingStore.Builder |
builder() |
List<EmbeddingMatch<TextSegment>> |
findRelevant(Embedding referenceEmbedding,
int maxResults,
double minScore) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindRelevantpublic ChromaEmbeddingStore(String baseUrl, String collectionName, Duration timeout)
baseUrl - The base URL of the Chroma service.collectionName - The name of the collection in the Chroma service. If not specified, "default" will be used.timeout - The timeout duration for the Chroma client. If not specified, 5 seconds will be used.public static ChromaEmbeddingStore.Builder builder()
public String add(Embedding embedding)
add in interface EmbeddingStore<TextSegment>public void add(String id, Embedding embedding)
add in interface EmbeddingStore<TextSegment>public String add(Embedding embedding, TextSegment textSegment)
add in interface EmbeddingStore<TextSegment>public List<String> addAll(List<Embedding> embeddings)
addAll in interface EmbeddingStore<TextSegment>public List<String> addAll(List<Embedding> embeddings, List<TextSegment> textSegments)
addAll in interface EmbeddingStore<TextSegment>public List<EmbeddingMatch<TextSegment>> findRelevant(Embedding referenceEmbedding, int maxResults, double minScore)
findRelevant in interface EmbeddingStore<TextSegment>Copyright © 2023. All rights reserved.