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.Builderself()Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods 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_dimensionin the VoyageAI documentation. Only for thetext_embeddingtask 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. Thevoyageaiservice sets a default number of requests allowed per minute depending on the task type. For bothtext_embeddingandrerank, 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. Thevoyageaiservice sets a default number of requests allowed per minute depending on the task type. For bothtext_embeddingandrerank, it is set to2000.API name:
rate_limit -
embeddingType
The data type for the embeddings to be returned. This setting maps tooutput_dtypein the VoyageAI documentation. Permitted values: float, int8, bit.int8is a synonym ofbytein the VoyageAI documentation.bitis a synonym ofbinaryin the VoyageAI documentation. Only for thetext_embeddingtask type.API name:
embedding_type -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<VoyageAIServiceSettings.Builder>
-
build
Builds aVoyageAIServiceSettings.- Specified by:
buildin interfaceObjectBuilder<VoyageAIServiceSettings>- Throws:
NullPointerException- if some of the required fields are null.
-