类的使用
dev.langchain4j.data.embedding.Embedding
使用Embedding的程序包
程序包
说明
-
dev.langchain4j.data.embedding中Embedding的使用
-
dev.langchain4j.model.embedding中Embedding的使用
返回变量类型为Embedding的类型的dev.langchain4j.model.embedding中的方法修饰符和类型方法说明DisabledEmbeddingModel.embed(TextSegment textSegment) EmbeddingModel.embed(TextSegment textSegment) Embed the text content of a TextSegment.Embed a text.DisabledEmbeddingModel.embedAll(List<TextSegment> textSegments) EmbeddingModel.embedAll(List<TextSegment> textSegments) Embeds the text content of a list of TextSegments. -
dev.langchain4j.store.embedding中Embedding的使用
修饰符和类型方法说明EmbeddingMatch.embedding()Returns the embedding that has been matched.EmbeddingSearchRequest.queryEmbedding()参数类型为Embedding的dev.langchain4j.store.embedding中的方法修饰符和类型方法说明Adds a given embedding to the store.Adds a given embedding and the corresponding content that has been embedded to the store.voidAdds a given embedding to the store.static doubleCalculates cosine similarity between two vectors.default List<EmbeddingMatch<Embedded>>EmbeddingStore.findRelevant(Embedding referenceEmbedding, int maxResults) 已过时。default List<EmbeddingMatch<Embedded>>EmbeddingStore.findRelevant(Embedding referenceEmbedding, int maxResults, double minScore) 已过时。as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)instead.default List<EmbeddingMatch<Embedded>>EmbeddingStore.findRelevant(Object memoryId, Embedding referenceEmbedding, int maxResults) 已过时。as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)instead.default List<EmbeddingMatch<Embedded>>EmbeddingStore.findRelevant(Object memoryId, Embedding referenceEmbedding, int maxResults, double minScore) 已过时。as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)instead.类型变量类型为Embedding的dev.langchain4j.store.embedding中的方法参数修饰符和类型方法说明Adds multiple embeddings to the store.Adds multiple embeddings and their corresponding contents that have been embedded to the store.参数类型为Embedding的dev.langchain4j.store.embedding中的构造器限定符构造器说明EmbeddingMatch(Double score, String embeddingId, Embedding embedding, Embedded embedded) Creates a new instance.EmbeddingSearchRequest(Embedding queryEmbedding, Integer maxResults, Double minScore, Filter filter) Creates an instance of an EmbeddingSearchRequest.
EmbeddingStore.search(EmbeddingSearchRequest)instead.