com.smartgwt.client.ai

## Class UserAIRequest

- 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.UserAIRequest

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

      public class UserAIRequest
      extends SingleSourceAIRequest

  Represents a user-specified and user-modifiable request to AI in some context. For example, the user's request may be in the context of AI-assisted filtering of a `ListGrid`; in such a context, the user's request is their description of which records they would like to see.

  The user's request is combined with other messages, data, and instructions provided by the framework to create `AIRequest`s that are sent to the AI engine for the purpose of fulfilling the user's request.

- - ### 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
    `UserAIRequest()`
    `UserAIRequest(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AIMessage[]` | `getAdditionalMessages()` Additional messages from the user.
    `static UserAIRequest` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.Object` | `getPrompt()` The data of the user's request.
    `AIContentType` | `getPromptType()` The type of data of the user-specified `prompt`.
    `UserAIRequest` | `setAdditionalMessages(AIMessage... additionalMessages)` Additional messages from the user.
    `UserAIRequest` | `setPrompt(java.lang.Object prompt)` The data of the user's request.
    `UserAIRequest` | `setPromptType(AIContentType promptType)` The type of data of the user-specified `prompt`.

    - ### 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

    - #### UserAIRequest

          public UserAIRequest()

    - #### UserAIRequest

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

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### setAdditionalMessages

          public UserAIRequest setAdditionalMessages(AIMessage... additionalMessages)

      Additional messages from the user. For example, the `prompt` may be an image, and additional text from the user about their request can be added to this array.
      Overrides:
        `setAdditionalMessages` in class `SingleSourceAIRequest`
      Parameters:
        `additionalMessages` - New additionalMessages value. Default value is null
      Returns:
        `UserAIRequest` instance, for chaining setter calls

    - #### getAdditionalMessages

          public AIMessage[] getAdditionalMessages()

      Additional messages from the user. For example, the `prompt` may be an image, and additional text from the user about their request can be added to this array.
      Overrides:
        `getAdditionalMessages` in class `SingleSourceAIRequest`
      Returns:
        Current additionalMessages value. Default value is null

    - #### setPrompt

          public UserAIRequest setPrompt(java.lang.Object prompt)

      The data of the user's request. The type of data is specified by the `promptType`.
      Overrides:
        `setPrompt` in class `SingleSourceAIRequest`
      Parameters:
        `prompt` - New prompt value. Default value is null
      Returns:
        `UserAIRequest` instance, for chaining setter calls

    - #### getPrompt

          public java.lang.Object getPrompt()

      The data of the user's request. The type of data is specified by the `promptType`.
      Overrides:
        `getPrompt` in class `SingleSourceAIRequest`
      Returns:
        Current prompt value. Default value is null

    - #### setPromptType

          public UserAIRequest setPromptType(AIContentType promptType)

      The type of data of the user-specified `prompt`.
      Overrides:
        `setPromptType` in class `SingleSourceAIRequest`
      Parameters:
        `promptType` - New promptType value. Default value is "text"
      Returns:
        `UserAIRequest` instance, for chaining setter calls

    - #### getPromptType

          public AIContentType getPromptType()

      The type of data of the user-specified `prompt`.
      Overrides:
        `getPromptType` in class `SingleSourceAIRequest`
      Returns:
        Current promptType value. Default value is "text"