Class ContextualAITaskSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.ContextualAITaskSettings
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class ContextualAITaskSettings
extends Object
implements JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<ContextualAITaskSettings>Json deserializer forContextualAITaskSettings -
Method Summary
Modifier and TypeMethodDescriptionfinal StringInstructions for the reranking model.static ContextualAITaskSettingsfinal BooleanWhether to return the source documents in the response.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 IntegertopK()The number of most relevant documents to return.toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forContextualAITaskSettings
-
-
Method Details
-
of
public static ContextualAITaskSettings of(Function<ContextualAITaskSettings.Builder, ObjectBuilder<ContextualAITaskSettings>> fn) -
instruction
Instructions for the reranking model. Refer to https://docs.contextual.ai/api-reference/rerank/rerank#body-instruction Only for thereranktask type.API name:
instruction -
returnDocuments
Whether to return the source documents in the response. Only for thereranktask type.API name:
return_documents -
topK
The number of most relevant documents to return. If not specified, the reranking results of all documents will be returned. Only for thereranktask type.API name:
top_k -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupContextualAITaskSettingsDeserializer
protected static void setupContextualAITaskSettingsDeserializer(ObjectDeserializer<ContextualAITaskSettings.Builder> op)
-