Class ExtensionConfig.AiTasks.Task.SelectMetadata
-
- All Implemented Interfaces:
public final class ExtensionConfig.AiTasks.Task.SelectMetadata
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classExtensionConfig.AiTasks.Task.SelectMetadata.BuilderA builder for SelectMetadata.
public final classExtensionConfig.AiTasks.Task.SelectMetadata.Vocabulary
-
Method Summary
Modifier and Type Method Description final Stringfield()Name of the custom metadata field to set. final Stringinstruction()The question or instruction for the AI to analyze the image. final JsonValue_type()Task type that analyzes the image and sets a custom metadata field value from a vocabulary. final Optional<Long>maxSelections()Maximum number of values to select from the vocabulary. final Optional<Long>minSelections()Minimum number of values to select from the vocabulary. final Optional<List<ExtensionConfig.AiTasks.Task.SelectMetadata.Vocabulary>>vocabulary()An array of possible values matching the custom metadata field type. final JsonField<String>_field()Returns the raw JSON value of field. final JsonField<String>_instruction()Returns the raw JSON value of instruction. final JsonField<Long>_maxSelections()Returns the raw JSON value of maxSelections. final JsonField<Long>_minSelections()Returns the raw JSON value of minSelections. final JsonField<List<ExtensionConfig.AiTasks.Task.SelectMetadata.Vocabulary>>_vocabulary()Returns the raw JSON value of vocabulary. final Map<String, JsonValue>_additionalProperties()final ExtensionConfig.AiTasks.Task.SelectMetadata.BuildertoBuilder()final ExtensionConfig.AiTasks.Task.SelectMetadatavalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ExtensionConfig.AiTasks.Task.SelectMetadata.Builderbuilder()Returns a mutable builder for constructing an instance of SelectMetadata. -
-
Method Detail
-
field
final String field()
Name of the custom metadata field to set. The field must exist in your account.
-
instruction
final String instruction()
The question or instruction for the AI to analyze the image.
-
_type
final JsonValue _type()
Task type that analyzes the image and sets a custom metadata field value from a vocabulary.
Expected to always return the following:
JsonValue.from("select_metadata")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
maxSelections
final Optional<Long> maxSelections()
Maximum number of values to select from the vocabulary.
-
minSelections
final Optional<Long> minSelections()
Minimum number of values to select from the vocabulary.
-
vocabulary
final Optional<List<ExtensionConfig.AiTasks.Task.SelectMetadata.Vocabulary>> vocabulary()
An array of possible values matching the custom metadata field type. If not provided for SingleSelect or MultiSelect field types, all values from the custom metadata field definition will be used. When providing large vocabularies (above 30 items), the AI may not strictly adhere to the list.
-
_field
final JsonField<String> _field()
Returns the raw JSON value of field.
Unlike field, this method doesn't throw if the JSON field has an unexpected type.
-
_instruction
final JsonField<String> _instruction()
Returns the raw JSON value of instruction.
Unlike instruction, this method doesn't throw if the JSON field has an unexpected type.
-
_maxSelections
final JsonField<Long> _maxSelections()
Returns the raw JSON value of maxSelections.
Unlike maxSelections, this method doesn't throw if the JSON field has an unexpected type.
-
_minSelections
final JsonField<Long> _minSelections()
Returns the raw JSON value of minSelections.
Unlike minSelections, this method doesn't throw if the JSON field has an unexpected type.
-
_vocabulary
final JsonField<List<ExtensionConfig.AiTasks.Task.SelectMetadata.Vocabulary>> _vocabulary()
Returns the raw JSON value of vocabulary.
Unlike vocabulary, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ExtensionConfig.AiTasks.Task.SelectMetadata.Builder toBuilder()
-
validate
final ExtensionConfig.AiTasks.Task.SelectMetadata validate()
-
builder
final static ExtensionConfig.AiTasks.Task.SelectMetadata.Builder builder()
Returns a mutable builder for constructing an instance of SelectMetadata.
The following fields are required:
.field() .instruction()
-
-
-
-