Package 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:
  `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
  Description
  `UserAIRequest()`
  `UserAIRequest(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AIMessage[]`
  `getAdditionalMessages()`
  Additional messages from the user.
  `static UserAIRequest`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `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(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 Details

  - ### UserAIRequest

    public UserAIRequest()

  - ### UserAIRequest

    public UserAIRequest(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static UserAIRequest getOrCreateRef(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(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 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"