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 TypeMethodDescriptionstatic JinaAITaskSettings
final Boolean
For arerank
task, return the doc text within the results.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final JinaAITextEmbeddingTask
task()
For atext_embedding
task, the task passed to the model.final Integer
topN()
For arerank
task, 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 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
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupJinaAITaskSettingsDeserializer
protected static void setupJinaAITaskSettingsDeserializer(ObjectDeserializer<JinaAITaskSettings.Builder> op)
-