Class VoyageAIServiceSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<VoyageAIServiceSettings.Builder>
co.elastic.clients.elasticsearch.inference.VoyageAIServiceSettings.Builder
- All Implemented Interfaces:
WithJson<VoyageAIServiceSettings.Builder>
,ObjectBuilder<VoyageAIServiceSettings>
- Enclosing class:
- VoyageAIServiceSettings
public static class VoyageAIServiceSettings.Builder
extends WithJsonObjectBuilderBase<VoyageAIServiceSettings.Builder>
implements ObjectBuilder<VoyageAIServiceSettings>
Builder for
VoyageAIServiceSettings
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aVoyageAIServiceSettings
.dimensions
(Integer value) The number of dimensions for resulting output embeddings.embeddingType
(Float value) The data type for the embeddings to be returned.Required - The name of the model to use for the inference task.rateLimit
(RateLimitSetting value) This setting helps to minimize the number of rate limit errors returned from VoyageAI.This setting helps to minimize the number of rate limit errors returned from VoyageAI.protected VoyageAIServiceSettings.Builder
self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dimensions
The number of dimensions for resulting output embeddings. This setting maps tooutput_dimension
in the VoyageAI documentation. Only for thetext_embedding
task type.API name:
dimensions
-
modelId
Required - The name of the model to use for the inference task. Refer to the VoyageAI documentation for the list of available text embedding and rerank models.API name:
model_id
-
rateLimit
This setting helps to minimize the number of rate limit errors returned from VoyageAI. Thevoyageai
service sets a default number of requests allowed per minute depending on the task type. For bothtext_embedding
andrerank
, it is set to2000
.API name:
rate_limit
-
rateLimit
public final VoyageAIServiceSettings.Builder rateLimit(Function<RateLimitSetting.Builder, ObjectBuilder<RateLimitSetting>> fn) This setting helps to minimize the number of rate limit errors returned from VoyageAI. Thevoyageai
service sets a default number of requests allowed per minute depending on the task type. For bothtext_embedding
andrerank
, it is set to2000
.API name:
rate_limit
-
embeddingType
The data type for the embeddings to be returned. This setting maps tooutput_dtype
in the VoyageAI documentation. Permitted values: float, int8, bit.int8
is a synonym ofbyte
in the VoyageAI documentation.bit
is a synonym ofbinary
in the VoyageAI documentation. Only for thetext_embedding
task type.API name:
embedding_type
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<VoyageAIServiceSettings.Builder>
-
build
Builds aVoyageAIServiceSettings
.- Specified by:
build
in interfaceObjectBuilder<VoyageAIServiceSettings>
- Throws:
NullPointerException
- if some of the required fields are null.
-