Class JinaAITaskSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<JinaAITaskSettings.Builder>
co.elastic.clients.elasticsearch.inference.JinaAITaskSettings.Builder
- All Implemented Interfaces:
WithJson<JinaAITaskSettings.Builder>
,ObjectBuilder<JinaAITaskSettings>
- Enclosing class:
- JinaAITaskSettings
public static class JinaAITaskSettings.Builder
extends WithJsonObjectBuilderBase<JinaAITaskSettings.Builder>
implements ObjectBuilder<JinaAITaskSettings>
Builder for
JinaAITaskSettings
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aJinaAITaskSettings
.returnDocuments
(Boolean value) For arerank
task, return the doc text within the results.protected JinaAITaskSettings.Builder
self()
task
(JinaAITextEmbeddingTask value) For atext_embedding
task, the task passed to the model.For arerank
task, the number of most relevant documents to return.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
-
returnDocuments
For arerank
task, return the doc text within the results.API name:
return_documents
-
task
For atext_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
For arerank
task, the number of most relevant documents to return. It defaults to the number of the documents. If this inference endpoint is used in atext_similarity_reranker
retriever query andtop_n
is set, it must be greater than or equal torank_window_size
in the query.API name:
top_n
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<JinaAITaskSettings.Builder>
-
build
Builds aJinaAITaskSettings
.- Specified by:
build
in interfaceObjectBuilder<JinaAITaskSettings>
- Throws:
NullPointerException
- if some of the required fields are null.
-