Class JinaAITaskSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.JinaAITaskSettings
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<JinaAITaskSettings>Json deserializer forJinaAITaskSettings -
Method Summary
Modifier and TypeMethodDescriptionfinal JinaAITextEmbeddingTaskFor anembeddingortext_embeddingtask, the task passed to the model.final BooleanFor anembeddingortext_embeddingtask, controls when text is split into chunks.static JinaAITaskSettingsrebuild()final BooleanFor areranktask, return the doc text within the results.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal IntegertopN()For areranktask, the number of most relevant documents to return.toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forJinaAITaskSettings
-
-
Method Details
-
of
public static JinaAITaskSettings of(Function<JinaAITaskSettings.Builder, ObjectBuilder<JinaAITaskSettings>> fn) -
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 -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
rebuild
- Returns:
- New
JinaAITaskSettings.Builderinitialized with field values of this instance
-
setupJinaAITaskSettingsDeserializer
protected static void setupJinaAITaskSettingsDeserializer(ObjectDeserializer<JinaAITaskSettings.Builder> op)
-