Class ContextualAITaskSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<ContextualAITaskSettings.Builder>
co.elastic.clients.elasticsearch.inference.ContextualAITaskSettings.Builder
- All Implemented Interfaces:
- WithJson<ContextualAITaskSettings.Builder>,- ObjectBuilder<ContextualAITaskSettings>
- Enclosing class:
- ContextualAITaskSettings
public static class ContextualAITaskSettings.Builder
extends WithJsonObjectBuilderBase<ContextualAITaskSettings.Builder>
implements ObjectBuilder<ContextualAITaskSettings>
Builder for 
ContextualAITaskSettings.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds aContextualAITaskSettings.instruction(String value) Instructions for the reranking model.returnDocuments(Boolean value) Whether to return the source documents in the response.protected ContextualAITaskSettings.Builderself()The number of most relevant documents to return.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBasewithJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
instructionInstructions for the reranking model. Refer to https://docs.contextual.ai/api-reference/rerank/rerank#body-instruction Only for thereranktask type.API name: instruction
- 
returnDocumentsWhether to return the source documents in the response. Only for thereranktask type.API name: return_documents
- 
topKThe 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
- 
self- Specified by:
- selfin class- WithJsonObjectBuilderBase<ContextualAITaskSettings.Builder>
 
- 
buildBuilds aContextualAITaskSettings.- Specified by:
- buildin interface- ObjectBuilder<ContextualAITaskSettings>
- Throws:
- NullPointerException- if some of the required fields are null.
 
 
-