Class ZeroShotClassificationInferenceOptions
java.lang.Object
co.elastic.clients.elasticsearch.ml.ZeroShotClassificationInferenceOptions
- All Implemented Interfaces:
InferenceConfigCreateVariant
,JsonpSerializable
@JsonpDeserializable public class ZeroShotClassificationInferenceOptions extends java.lang.Object implements InferenceConfigCreateVariant, JsonpSerializable
Zero shot classification configuration options
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ZeroShotClassificationInferenceOptions.Builder
Builder forZeroShotClassificationInferenceOptions
. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<ZeroShotClassificationInferenceOptions>
_DESERIALIZER
Json deserializer forZeroShotClassificationInferenceOptions
-
Method Summary
Modifier and Type Method Description InferenceConfigCreate.Kind
_inferenceConfigCreateKind()
InferenceConfigCreate variant kind.java.util.List<java.lang.String>
classificationLabels()
Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradictionjava.lang.String
hypothesisTemplate()
Hypothesis template used when tokenizing labels for predictionjava.util.List<java.lang.String>
labels()
The labels to predict.java.lang.Boolean
multiLabel()
Indicates if more than one true label exists.static ZeroShotClassificationInferenceOptions
of(java.util.function.Function<ZeroShotClassificationInferenceOptions.Builder,ObjectBuilder<ZeroShotClassificationInferenceOptions>> 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
setupZeroShotClassificationInferenceOptionsDeserializer(ObjectDeserializer<ZeroShotClassificationInferenceOptions.Builder> op)
TokenizationConfig
tokenization()
The tokenization options to update when inferringjava.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 forZeroShotClassificationInferenceOptions
-
-
Method Details
-
of
public static ZeroShotClassificationInferenceOptions of(java.util.function.Function<ZeroShotClassificationInferenceOptions.Builder,ObjectBuilder<ZeroShotClassificationInferenceOptions>> fn) -
_inferenceConfigCreateKind
InferenceConfigCreate variant kind.- Specified by:
_inferenceConfigCreateKind
in interfaceInferenceConfigCreateVariant
-
tokenization
The tokenization options to update when inferringAPI name:
tokenization
-
hypothesisTemplate
@Nullable public final java.lang.String hypothesisTemplate()Hypothesis template used when tokenizing labels for predictionAPI name:
hypothesis_template
-
classificationLabels
public final java.util.List<java.lang.String> classificationLabels()Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradictionAPI name:
classification_labels
-
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
-
multiLabel
@Nullable public final java.lang.Boolean multiLabel()Indicates if more than one true label exists.API name:
multi_label
-
labels
public final java.util.List<java.lang.String> labels()The labels to predict.API name:
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
-
setupZeroShotClassificationInferenceOptionsDeserializer
protected static void setupZeroShotClassificationInferenceOptionsDeserializer(ObjectDeserializer<ZeroShotClassificationInferenceOptions.Builder> op)
-