Class TextClassificationInferenceOptions
java.lang.Object
co.elastic.clients.elasticsearch.ml.TextClassificationInferenceOptions
- All Implemented Interfaces:
InferenceConfigCreateVariant
,JsonpSerializable
@JsonpDeserializable public class TextClassificationInferenceOptions extends java.lang.Object implements InferenceConfigCreateVariant, JsonpSerializable
Text classification configuration options
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TextClassificationInferenceOptions.Builder
Builder forTextClassificationInferenceOptions
. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<TextClassificationInferenceOptions>
_DESERIALIZER
Json deserializer forTextClassificationInferenceOptions
-
Method Summary
Modifier and Type Method Description InferenceConfigCreate.Kind
_inferenceConfigCreateKind()
InferenceConfigCreate variant kind.java.util.List<java.lang.String>
classificationLabels()
Classification labels to apply other than the stored labels.java.lang.Integer
numTopClasses()
Specifies the number of top class predictions to return.static TextClassificationInferenceOptions
of(java.util.function.Function<TextClassificationInferenceOptions.Builder,ObjectBuilder<TextClassificationInferenceOptions>> fn)
java.lang.String
resultsField()
The field that is added to incoming documents to contain the inference prediction.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Serialize this object to JSON.protected void
serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupTextClassificationInferenceOptionsDeserializer(ObjectDeserializer<TextClassificationInferenceOptions.Builder> op)
TokenizationConfig
tokenization()
The tokenization optionsjava.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface co.elastic.clients.elasticsearch.ml.InferenceConfigCreateVariant
_toInferenceConfigCreate
-
Field Details
-
_DESERIALIZER
Json deserializer forTextClassificationInferenceOptions
-
-
Method Details
-
of
public static TextClassificationInferenceOptions of(java.util.function.Function<TextClassificationInferenceOptions.Builder,ObjectBuilder<TextClassificationInferenceOptions>> fn) -
_inferenceConfigCreateKind
InferenceConfigCreate variant kind.- Specified by:
_inferenceConfigCreateKind
in interfaceInferenceConfigCreateVariant
-
numTopClasses
@Nullable public final java.lang.Integer numTopClasses()Specifies the number of top class predictions to return. Defaults to 0.API name:
num_top_classes
-
tokenization
The tokenization optionsAPI name:
tokenization
-
resultsField
@Nullable public final java.lang.String resultsField()The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.API name:
results_field
-
classificationLabels
public final java.util.List<java.lang.String> classificationLabels()Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labelsAPI name:
classification_labels
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
setupTextClassificationInferenceOptionsDeserializer
protected static void setupTextClassificationInferenceOptionsDeserializer(ObjectDeserializer<TextClassificationInferenceOptions.Builder> op)
-