public class OpenAiEmbeddingModel extends Object implements EmbeddingModel, TokenCountEstimator
| Constructor and Description |
|---|
OpenAiEmbeddingModel(String baseUrl,
String apiKey,
String organizationId,
String modelName,
String user,
Duration timeout,
Integer maxRetries,
Proxy proxy,
Boolean logRequests,
Boolean logResponses,
Tokenizer tokenizer) |
| Modifier and Type | Method and Description |
|---|---|
Response<List<Embedding>> |
embedAll(List<TextSegment> textSegments) |
int |
estimateTokenCount(String text) |
static OpenAiEmbeddingModel |
withApiKey(String apiKey) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitembed, embedestimateTokenCount, estimateTokenCountpublic Response<List<Embedding>> embedAll(List<TextSegment> textSegments)
embedAll in interface EmbeddingModelpublic int estimateTokenCount(String text)
estimateTokenCount in interface TokenCountEstimatorpublic static OpenAiEmbeddingModel withApiKey(String apiKey)
Copyright © 2023. All rights reserved.