com.smartgwt.client.ai

## Class AIFieldRequest

- java.lang.Object
- - com.smartgwt.client.core.JsObject
  - - com.smartgwt.client.core.DataClass
    - - com.smartgwt.client.core.RefDataClass
      - - com.smartgwt.client.ai.SingleSourceAIRequest
        - - com.smartgwt.client.ai.AIFieldRequest

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers

      public class AIFieldRequest
      extends SingleSourceAIRequest

  Settings that configure requests to AI to generate the values for a field.
  See Also:
    `AI.buildAIFieldRequest(com.smartgwt.client.ai.BuildAIFieldRequestRequest, com.smartgwt.client.callbacks.BuildAIFieldRequestResponseCallback)`

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.RefDataClass

      `id`

    - ### Fields inherited from class com.smartgwt.client.core.DataClass

      `factoryCreated, factoryProperties`

    - ### Fields inherited from class com.smartgwt.client.core.JsObject

      `jsObj`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AIFieldRequest()`
    `AIFieldRequest(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String[]` | `getCategories()` If the `valueClass` is CATEGORICAL or ORDINAL, the list of available categories.
    `java.lang.Integer` | `getMaxRecordsPerBatch()` When generating values for a list of records that are split into batches, the maximum number of records per batch.
    `java.lang.Integer` | `getMaxValue()` If the `valueClass` is INTERVAL or RATIO, the maximum value that can be generated.
    `java.lang.Integer` | `getMinValue()` If the `valueClass` is INTERVAL or RATIO, the minimum value that can be generated.
    `static AIFieldRequest` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.String[]` | `getRelevantFieldNames()` The names of fields that are relevant to each `SummarizeRecordsRequest`.
    `ValueClass` | `getValueClass()` The class of value that AI will be asked to generate for the field.
    `AIFieldRequest` | `setCategories(java.lang.String... categories)` If the `valueClass` is CATEGORICAL or ORDINAL, the list of available categories.
    `AIFieldRequest` | `setMaxRecordsPerBatch(java.lang.Integer maxRecordsPerBatch)` When generating values for a list of records that are split into batches, the maximum number of records per batch.
    `AIFieldRequest` | `setMaxValue(java.lang.Integer maxValue)` If the `valueClass` is INTERVAL or RATIO, the maximum value that can be generated.
    `AIFieldRequest` | `setMinValue(java.lang.Integer minValue)` If the `valueClass` is INTERVAL or RATIO, the minimum value that can be generated.
    `AIFieldRequest` | `setRelevantFieldNames(java.lang.String... relevantFieldNames)` The names of fields that are relevant to each `SummarizeRecordsRequest`.
    `AIFieldRequest` | `setValueClass(ValueClass valueClass)` The class of value that AI will be asked to generate for the field.

    - ### Methods inherited from class com.smartgwt.client.ai.SingleSourceAIRequest

      `getAdditionalMessages, getPrompt, getPromptType, setAdditionalMessages, setPrompt, setPromptType`

    - ### Methods inherited from class com.smartgwt.client.core.RefDataClass

      `getRef, getRef, internalSetID`

    - ### Methods inherited from class com.smartgwt.client.core.DataClass

      `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

    - ### Methods inherited from class com.smartgwt.client.core.JsObject

      `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AIFieldRequest

          public AIFieldRequest()

    - #### AIFieldRequest

          public AIFieldRequest(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static AIFieldRequest getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setCategories

          public AIFieldRequest setCategories(java.lang.String... categories)

      If the `valueClass` is CATEGORICAL or ORDINAL, the list of available categories.
      Parameters:
        `categories` - New categories value. Default value is null
      Returns:
        `AIFieldRequest` instance, for chaining setter calls

    - #### getCategories

          public java.lang.String[] getCategories()

      If the `valueClass` is CATEGORICAL or ORDINAL, the list of available categories.
      Returns:
        Current categories value. Default value is null

    - #### setMaxRecordsPerBatch

          public AIFieldRequest setMaxRecordsPerBatch(java.lang.Integer maxRecordsPerBatch)

      When generating values for a list of records that are split into batches, the maximum number of records per batch.
      Parameters:
        `maxRecordsPerBatch` - New maxRecordsPerBatch value. Default value is null
      Returns:
        `AIFieldRequest` instance, for chaining setter calls

    - #### getMaxRecordsPerBatch

          public java.lang.Integer getMaxRecordsPerBatch()

      When generating values for a list of records that are split into batches, the maximum number of records per batch.
      Returns:
        Current maxRecordsPerBatch value. Default value is null

    - #### setMaxValue

          public AIFieldRequest setMaxValue(java.lang.Integer maxValue)

      If the `valueClass` is INTERVAL or RATIO, the maximum value that can be generated. If `null`, then there is no maximum.
      Parameters:
        `maxValue` - New maxValue value. Default value is null
      Returns:
        `AIFieldRequest` instance, for chaining setter calls

    - #### getMaxValue

          public java.lang.Integer getMaxValue()

      If the `valueClass` is INTERVAL or RATIO, the maximum value that can be generated. If `null`, then there is no maximum.
      Returns:
        Current maxValue value. Default value is null

    - #### setMinValue

          public AIFieldRequest setMinValue(java.lang.Integer minValue)

      If the `valueClass` is INTERVAL or RATIO, the minimum value that can be generated. If `null`, then there is no minimum.
      Parameters:
        `minValue` - New minValue value. Default value is null
      Returns:
        `AIFieldRequest` instance, for chaining setter calls

    - #### getMinValue

          public java.lang.Integer getMinValue()

      If the `valueClass` is INTERVAL or RATIO, the minimum value that can be generated. If `null`, then there is no minimum.
      Returns:
        Current minValue value. Default value is null

    - #### setRelevantFieldNames

          public AIFieldRequest setRelevantFieldNames(java.lang.String... relevantFieldNames)

      The names of fields that are relevant to each `SummarizeRecordsRequest`.
      Parameters:
        `relevantFieldNames` - New relevantFieldNames value. Default value is null
      Returns:
        `AIFieldRequest` instance, for chaining setter calls
      See Also:
        `FieldName`

    - #### getRelevantFieldNames

          public java.lang.String[] getRelevantFieldNames()

      The names of fields that are relevant to each `SummarizeRecordsRequest`.
      Returns:
        Current relevantFieldNames value. Default value is null
      See Also:
        `FieldName`

    - #### setValueClass

          public AIFieldRequest setValueClass(ValueClass valueClass)

      The class of value that AI will be asked to generate for the field.
      Parameters:
        `valueClass` - New valueClass value. Default value is "general"
      Returns:
        `AIFieldRequest` instance, for chaining setter calls

    - #### getValueClass

          public ValueClass getValueClass()

      The class of value that AI will be asked to generate for the field.
      Returns:
        Current valueClass value. Default value is "general"