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.inputType(JinaAITextEmbeddingTask value) For anembeddingortext_embeddingtask, the task passed to the model.lateChunking(Boolean value) For anembeddingortext_embeddingtask, controls when text is split into chunks.returnDocuments(Boolean value) For areranktask, return the doc text within the results.protected JinaAITaskSettings.Builderself()For areranktask, the number of most relevant documents to return.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
-
returnDocuments
For areranktask, return the doc text within the results.API name:
return_documents -
inputType
For anembeddingortext_embeddingtask, the task passed to the model. Valid values are:classification: Use it for embeddings passed through a 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:
input_type -
lateChunking
For anembeddingortext_embeddingtask, controls when text is split into chunks. When set totrue, a request from Elasticsearch contains only chunks related to a single document. Instead of batching chunks across documents, Elasticsearch sends them in separate requests. This ensures that chunk embeddings retain context from the entire document, improving semantic quality.If a document exceeds the model's context limits, or if the document contains non-text inputs (relevant when using the multimodal
embeddingtask), late chunking is automatically disabled for that document only and standard chunking is used instead.If not specified, defaults to
false.API name:
late_chunking -
topN
For areranktask, 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_rerankerretriever query andtop_nis set, it must be greater than or equal torank_window_sizein the query.API name:
top_n -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<JinaAITaskSettings.Builder>
-
build
Builds aJinaAITaskSettings.- Specified by:
buildin interfaceObjectBuilder<JinaAITaskSettings>- Throws:
NullPointerException- if some of the required fields are null.
-