Package dev.langchain4j.model.workersai
Class WorkersAiEmbeddingModel
java.lang.Object
dev.langchain4j.model.workersai.client.AbstractWorkersAIModel
dev.langchain4j.model.workersai.WorkersAiEmbeddingModel
- All Implemented Interfaces:
EmbeddingModel
WorkerAI Embedding model.
...
-
Nested Class Summary
-
Field Summary
Fields inherited from class dev.langchain4j.model.workersai.client.AbstractWorkersAIModel
accountId, modelName, workerAiClient
-
Constructor Summary
ConstructorDescriptionConstructor with Builder.WorkersAiEmbeddingModel
(String accountId, String modelName, String apiToken) Constructor with Builder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Builder access.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.Methods inherited from class dev.langchain4j.model.workersai.client.AbstractWorkersAIModel
processErrors
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.embedding.EmbeddingModel
dimension
-
Constructor Details
-
WorkersAiEmbeddingModel
Constructor with Builder.- Parameters:
builder
- builder.
-
WorkersAiEmbeddingModel
Constructor with Builder.- Parameters:
accountId
- account identifiermodelName
- model nameapiToken
- api token
-
-
Method Details
-
builder
Builder access.- Returns:
- builder instance
-
embed
Embed a text.- Specified by:
embed
in interfaceEmbeddingModel
- Parameters:
text
- the text to embed.- Returns:
- the embedding.
-
embed
Embed the text content of a TextSegment.- Specified by:
embed
in interfaceEmbeddingModel
- Parameters:
textSegment
- the text segment to embed.- Returns:
- the embedding.
-
embedAll
Embeds the text content of a list of TextSegments.- Specified by:
embedAll
in interfaceEmbeddingModel
- Parameters:
textSegments
- the text segments to embed.- Returns:
- the embeddings.
-