接口 EmbeddingModel
public interface EmbeddingModel
Represents a model that can convert a given text into an embedding (vector representation of the text).
-
方法概要
修饰符和类型方法说明default intReturns the dimension of theEmbeddingproduced by this embedding model.embed(TextSegment textSegment) Embed the text content of a TextSegment.Embed a text.embedAll(List<TextSegment> textSegments) Embeds the text content of a list of TextSegments.
-
方法详细资料
-
embed
Embed a text.- 参数:
text- the text to embed.- 返回:
- the embedding.
-
embed
Embed the text content of a TextSegment.- 参数:
textSegment- the text segment to embed.- 返回:
- the embedding.
-
embedAll
Embeds the text content of a list of TextSegments.- 参数:
textSegments- the text segments to embed.- 返回:
- the embeddings.
-
dimension
default int dimension()Returns the dimension of theEmbeddingproduced by this embedding model.- 返回:
- dimension of the embedding
-