Class VoyageAITaskSettings

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

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

  • Method Details

    • of

    • inputType

      @Nullable public final String inputType()
      Type of the input text. Permitted values: ingest (maps to document in the VoyageAI documentation), search (maps to query in the VoyageAI documentation). Only for the text_embedding task type.

      API name: input_type

    • returnDocuments

      @Nullable public final Boolean returnDocuments()
      Whether to return the source documents in the response. Only for the rerank task type.

      API name: return_documents

    • topK

      @Nullable public final Integer topK()
      The number of most relevant documents to return. If not specified, the reranking results of all documents will be returned. Only for the rerank task type.

      API name: top_k

    • truncation

      @Nullable public final Boolean truncation()
      Whether to truncate the input texts to fit within the context length.

      API name: truncation

    • 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
    • setupVoyageAITaskSettingsDeserializer

      protected static void setupVoyageAITaskSettingsDeserializer(ObjectDeserializer<VoyageAITaskSettings.Builder> op)