Class TextEmbeddingInferenceOptions.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<TextEmbeddingInferenceOptions.Builder>
co.elastic.clients.elasticsearch.ml.TextEmbeddingInferenceOptions.Builder
- All Implemented Interfaces:
WithJson<TextEmbeddingInferenceOptions.Builder>
,ObjectBuilder<TextEmbeddingInferenceOptions>
- Enclosing class:
- TextEmbeddingInferenceOptions
public static class TextEmbeddingInferenceOptions.Builder
extends WithJsonObjectBuilderBase<TextEmbeddingInferenceOptions.Builder>
implements ObjectBuilder<TextEmbeddingInferenceOptions>
Builder for
TextEmbeddingInferenceOptions
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aTextEmbeddingInferenceOptions
.embeddingSize
(Integer value) The number of dimensions in the embedding outputresultsField
(String value) The field that is added to incoming documents to contain the inference prediction.protected TextEmbeddingInferenceOptions.Builder
self()
tokenization
(TokenizationConfig value) The tokenization optionsThe tokenization optionsThe tokenization optionsvocabulary
(Vocabulary value) Required - API name:vocabulary
Required - API name:vocabulary
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
-
embeddingSize
The number of dimensions in the embedding outputAPI name:
embedding_size
-
tokenization
The tokenization optionsAPI name:
tokenization
-
tokenization
public final TextEmbeddingInferenceOptions.Builder tokenization(Function<TokenizationConfig.Builder, ObjectBuilder<TokenizationConfig>> fn) The tokenization optionsAPI name:
tokenization
-
tokenization
The tokenization optionsAPI name:
tokenization
-
resultsField
The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.API name:
results_field
-
vocabulary
Required - API name:vocabulary
-
vocabulary
public final TextEmbeddingInferenceOptions.Builder vocabulary(Function<Vocabulary.Builder, ObjectBuilder<Vocabulary>> fn) Required - API name:vocabulary
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<TextEmbeddingInferenceOptions.Builder>
-
build
Builds aTextEmbeddingInferenceOptions
.- Specified by:
build
in interfaceObjectBuilder<TextEmbeddingInferenceOptions>
- Throws:
NullPointerException
- if some of the required fields are null.
-