Package com.smartgwt.client.ai

# Class SingleSourceAIRequest

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

All Implemented Interfaces:
  `HasHandlers`

Direct Known Subclasses:
  `AIFieldRequest`, `SystemAIRequest`, `UserAIRequest`

public class SingleSourceAIRequest extends RefDataClass
Represents a request to AI from a single `source` in some context.

- ## 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
  `SingleSourceAIRequest()`
  `SingleSourceAIRequest(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AIMessage[]`
  `getAdditionalMessages()`
  Additional messages.
  `static SingleSourceAIRequest`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `Object`
  `getPrompt()`
  The data of the request.
  `AIContentType`
  `getPromptType()`
  The type of data of the `prompt`.
  `SingleSourceAIRequest`
  `setAdditionalMessages(AIMessage... additionalMessages)`
  Additional messages.
  `SingleSourceAIRequest`
  `setPrompt(Object prompt)`
  The data of the request.
  `SingleSourceAIRequest`
  `setPromptType(AIContentType promptType)`
  The type of data of the `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

  - ### SingleSourceAIRequest

    public SingleSourceAIRequest()

  - ### SingleSourceAIRequest

    public SingleSourceAIRequest(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static SingleSourceAIRequest getOrCreateRef(JavaScriptObject jsObj)

  - ### setAdditionalMessages

    public SingleSourceAIRequest setAdditionalMessages(AIMessage... additionalMessages)
    Additional messages. For example, the `prompt` may be an image, and additional text about the request can be added to this array.
    Parameters:
      `additionalMessages` - New additionalMessages value. Default value is null
    Returns:
      `SingleSourceAIRequest` instance, for chaining setter calls

  - ### getAdditionalMessages

    public AIMessage[] getAdditionalMessages()
    Additional messages. For example, the `prompt` may be an image, and additional text about the request can be added to this array.
    Returns:
      Current additionalMessages value. Default value is null

  - ### setPrompt

    public SingleSourceAIRequest setPrompt(Object prompt)
    The data of the request. The type of data is specified by the `promptType`.
    Parameters:
      `prompt` - New prompt value. Default value is null
    Returns:
      `SingleSourceAIRequest` instance, for chaining setter calls

  - ### getPrompt

    public Object getPrompt()
    The data of the request. The type of data is specified by the `promptType`.
    Returns:
      Current prompt value. Default value is null

  - ### setPromptType

    public SingleSourceAIRequest setPromptType(AIContentType promptType)
    The type of data of the `prompt`.
    Parameters:
      `promptType` - New promptType value. Default value is "text"
    Returns:
      `SingleSourceAIRequest` instance, for chaining setter calls

  - ### getPromptType

    public AIContentType getPromptType()
    The type of data of the `prompt`.
    Returns:
      Current promptType value. Default value is "text"