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.Builder
self()
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
withJson
Methods 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 todocument
in the VoyageAI documentation),search
(maps toquery
in the VoyageAI documentation). Only for thetext_embedding
task type.API name:
input_type
-
returnDocuments
Whether to return the source documents in the response. Only for thererank
task 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 thererank
task type.API name:
top_k
-
truncation
Whether to truncate the input texts to fit within the context length.API name:
truncation
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<VoyageAITaskSettings.Builder>
-
build
Builds aVoyageAITaskSettings
.- Specified by:
build
in interfaceObjectBuilder<VoyageAITaskSettings>
- Throws:
NullPointerException
- if some of the required fields are null.
-