Class VoyageAITaskSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<VoyageAITaskSettings.Builder>
co.elastic.clients.elasticsearch.inference.VoyageAITaskSettings.Builder
- All Implemented Interfaces:
WithJson<VoyageAITaskSettings.Builder>,ObjectBuilder<VoyageAITaskSettings>
- Enclosing class:
- VoyageAITaskSettings
public static class VoyageAITaskSettings.Builder
extends WithJsonObjectBuilderBase<VoyageAITaskSettings.Builder>
implements ObjectBuilder<VoyageAITaskSettings>
Builder for
VoyageAITaskSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aVoyageAITaskSettings.Type of the input text.returnDocuments(Boolean value) Whether to return the source documents in the response.protected VoyageAITaskSettings.Builderself()The number of most relevant documents to return.truncation(Boolean value) Whether to truncate the input texts to fit within the context length.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
-
inputType
Type of the input text. Permitted values:ingest(maps todocumentin the VoyageAI documentation),search(maps toqueryin the VoyageAI documentation). Only for thetext_embeddingtask type.API name:
input_type -
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 -
truncation
Whether to truncate the input texts to fit within the context length.API name:
truncation -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<VoyageAITaskSettings.Builder>
-
build
Builds aVoyageAITaskSettings.- Specified by:
buildin interfaceObjectBuilder<VoyageAITaskSettings>- Throws:
NullPointerException- if some of the required fields are null.
-