Class JinaAITaskSettings

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

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

  • Method Details

    • of

    • returnDocuments

      @Nullable public final Boolean returnDocuments()
      For a rerank task, return the doc text within the results.

      API name: return_documents

    • task

      @Nullable public final JinaAITextEmbeddingTask task()
      For a text_embedding task, the task passed to the model. Valid values are:
      • classification: Use it for embeddings passed through a text classifier.
      • clustering: Use it for the embeddings run through a clustering algorithm.
      • ingest: Use it for storing document embeddings in a vector database.
      • search: Use it for storing embeddings of search queries run against a vector database to find relevant documents.

      API name: task

    • topN

      @Nullable public final Integer topN()
      For a rerank task, the number of most relevant documents to return. It defaults to the number of the documents. If this inference endpoint is used in a text_similarity_reranker retriever query and top_n is set, it must be greater than or equal to rank_window_size in the query.

      API name: top_n

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

      protected static void setupJinaAITaskSettingsDeserializer(ObjectDeserializer<JinaAITaskSettings.Builder> op)