Class VoyageAIServiceSettings

java.lang.Object
co.elastic.clients.elasticsearch.inference.VoyageAIServiceSettings
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class VoyageAIServiceSettings extends Object implements JsonpSerializable
See Also:
  • Field Details

  • Method Details

    • of

    • dimensions

      @Nullable public final Integer dimensions()
      The number of dimensions for resulting output embeddings. This setting maps to output_dimension in the VoyageAI documentation. Only for the text_embedding task type.

      API name: dimensions

    • modelId

      public final String 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

      @Nullable public final RateLimitSetting rateLimit()
      This setting helps to minimize the number of rate limit errors returned from VoyageAI. The voyageai service sets a default number of requests allowed per minute depending on the task type. For both text_embedding and rerank, it is set to 2000.

      API name: rate_limit

    • embeddingType

      @Nullable public final Float embeddingType()
      The data type for the embeddings to be returned. This setting maps to output_dtype in the VoyageAI documentation. Permitted values: float, int8, bit. int8 is a synonym of byte in the VoyageAI documentation. bit is a synonym of binary in the VoyageAI documentation. Only for the text_embedding task type.

      API name: embedding_type

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupVoyageAIServiceSettingsDeserializer

      protected static void setupVoyageAIServiceSettingsDeserializer(ObjectDeserializer<VoyageAIServiceSettings.Builder> op)