Package dev.langchain4j.model.openai
Class OpenAiEmbeddingModel
java.lang.Object
dev.langchain4j.model.openai.OpenAiEmbeddingModel
- All Implemented Interfaces:
EmbeddingModel
,TokenCountEstimator
Represents an OpenAI embedding model, such as text-embedding-ada-002.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
embedAll
(List<TextSegment> textSegments) int
estimateTokenCount
(String text) static OpenAiEmbeddingModel
withApiKey
(String apiKey) 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
embed, embed
Methods inherited from interface dev.langchain4j.model.embedding.TokenCountEstimator
estimateTokenCount, estimateTokenCount
-
Constructor Details
-
OpenAiEmbeddingModel
-
-
Method Details
-
embedAll
- Specified by:
embedAll
in interfaceEmbeddingModel
-
estimateTokenCount
- Specified by:
estimateTokenCount
in interfaceTokenCountEstimator
-
withApiKey
-
builder
-