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) intestimateTokenCount(String text) static OpenAiEmbeddingModelwithApiKey(String apiKey) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.langchain4j.model.embedding.EmbeddingModel
embed, embedMethods inherited from interface dev.langchain4j.model.embedding.TokenCountEstimator
estimateTokenCount, estimateTokenCount
-
Constructor Details
-
OpenAiEmbeddingModel
-
-
Method Details
-
embedAll
- Specified by:
embedAllin interfaceEmbeddingModel
-
estimateTokenCount
- Specified by:
estimateTokenCountin interfaceTokenCountEstimator
-
withApiKey
-
builder
-