| Package | Description |
|---|---|
| dev.langchain4j.data.embedding | |
| dev.langchain4j.model.embedding | |
| dev.langchain4j.store.embedding |
| Modifier and Type | Method and Description |
|---|---|
static Embedding |
Embedding.from(float[] vector) |
static Embedding |
Embedding.from(List<Float> vector) |
| Modifier and Type | Method and Description |
|---|---|
default Embedding |
EmbeddingModel.embed(String text) |
default Embedding |
EmbeddingModel.embed(TextSegment textSegment) |
| Modifier and Type | Method and Description |
|---|---|
List<Embedding> |
EmbeddingModel.embedAll(List<TextSegment> textSegments) |
| Modifier and Type | Method and Description |
|---|---|
Embedding |
EmbeddingMatch.embedding() |
| Modifier and Type | Method and Description |
|---|---|
String |
EmbeddingStore.add(Embedding embedding)
Adds a given embedding to the store.
|
String |
EmbeddingStore.add(Embedding embedding,
Embedded embedded)
Adds a given embedding and the corresponding content that has been embedded to the store.
|
void |
EmbeddingStore.add(String id,
Embedding embedding)
Adds a given embedding to the store.
|
default List<EmbeddingMatch<Embedded>> |
EmbeddingStore.findRelevant(Embedding referenceEmbedding,
int maxResults)
Finds the most relevant (closest in space) embeddings to the provided reference embedding.
|
List<EmbeddingMatch<Embedded>> |
EmbeddingStore.findRelevant(Embedding referenceEmbedding,
int maxResults,
double minScore)
Finds the most relevant (closest in space) embeddings to the provided reference embedding.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
EmbeddingStore.addAll(List<Embedding> embeddings)
Adds multiple embeddings to the store.
|
List<String> |
EmbeddingStore.addAll(List<Embedding> embeddings,
List<Embedded> embedded)
Adds multiple embeddings and their corresponding contents that have been embedded to the store.
|
| Constructor and Description |
|---|
EmbeddingMatch(Double score,
String embeddingId,
Embedding embedding,
Embedded embedded) |
Copyright © 2023. All rights reserved.