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 classZeroShotClassificationInferenceOptions.BuilderBuilder forZeroShotClassificationInferenceOptions. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<ZeroShotClassificationInferenceOptions>_DESERIALIZERJson 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.StringhypothesisTemplate()Hypothesis template used when tokenizing labels for predictionjava.util.List<java.lang.String>labels()The labels to predict.java.lang.BooleanmultiLabel()Indicates if more than one true label exists.static ZeroShotClassificationInferenceOptionsof(java.util.function.Function<ZeroShotClassificationInferenceOptions.Builder,ObjectBuilder<ZeroShotClassificationInferenceOptions>> fn)java.lang.StringresultsField()The field that is added to incoming documents to contain the inference prediction.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupZeroShotClassificationInferenceOptionsDeserializer(ObjectDeserializer<ZeroShotClassificationInferenceOptions.Builder> op)TokenizationConfigtokenization()The tokenization options to update when inferringjava.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
_inferenceConfigCreateKindin 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:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
setupZeroShotClassificationInferenceOptionsDeserializer
protected static void setupZeroShotClassificationInferenceOptionsDeserializer(ObjectDeserializer<ZeroShotClassificationInferenceOptions.Builder> op)
-