Class GoogleAiEmbeddingModel
java.lang.Object
dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel
dev.langchain4j.model.googleai.GoogleAiEmbeddingModel
- All Implemented Interfaces:
EmbeddingModel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
Fields inherited from class DimensionAwareEmbeddingModel
dimension -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbuilder()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.When known (e.g., can be derived from the model name), returns the dimension of theEmbeddingproduced by this embedding model.Methods inherited from class DimensionAwareEmbeddingModel
dimension
-
Constructor Details
-
GoogleAiEmbeddingModel
-
-
Method Details
-
builder
-
embed
Description copied from interface:EmbeddingModelEmbed the text content of a TextSegment.- Parameters:
textSegment- the text segment to embed.- Returns:
- the embedding.
-
embed
Description copied from interface:EmbeddingModelEmbed a text.- Parameters:
text- the text to embed.- Returns:
- the embedding.
-
embedAll
Description copied from interface:EmbeddingModelEmbeds the text content of a list of TextSegments.- Parameters:
textSegments- the text segments to embed.- Returns:
- the embeddings.
-
knownDimension
Description copied from class:DimensionAwareEmbeddingModelWhen known (e.g., can be derived from the model name), returns the dimension of theEmbeddingproduced by this embedding model. Otherwise, it returnsnull.- Overrides:
knownDimensionin classDimensionAwareEmbeddingModel- Returns:
- the known dimension of the
Embedding, ornullif unknown.
-