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
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 AIRequests
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
idFields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdditional messages from the user.static UserAIRequestgetOrCreateRef(JavaScriptObject jsObj) The data of the user's request.The type of data of the user-specifiedprompt.setAdditionalMessages(AIMessage... additionalMessages) Additional messages from the user.The data of the user's request.setPromptType(AIContentType promptType) The type of data of the user-specifiedprompt.Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef, internalSetIDMethods 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
-
Constructor Details
-
UserAIRequest
public UserAIRequest() -
UserAIRequest
-
-
Method Details
-
getOrCreateRef
-
setAdditionalMessages
Additional messages from the user. For example, thepromptmay be an image, and additional text from the user about their request can be added to this array.- Overrides:
setAdditionalMessagesin classSingleSourceAIRequest- Parameters:
additionalMessages- New additionalMessages value. Default value is null- Returns:
UserAIRequestinstance, for chaining setter calls
-
getAdditionalMessages
Additional messages from the user. For example, thepromptmay be an image, and additional text from the user about their request can be added to this array.- Overrides:
getAdditionalMessagesin classSingleSourceAIRequest- Returns:
- Current additionalMessages value. Default value is null
-
setPrompt
The data of the user's request. The type of data is specified by thepromptType.- Overrides:
setPromptin classSingleSourceAIRequest- Parameters:
prompt- New prompt value. Default value is null- Returns:
UserAIRequestinstance, for chaining setter calls
-
getPrompt
The data of the user's request. The type of data is specified by thepromptType.- Overrides:
getPromptin classSingleSourceAIRequest- Returns:
- Current prompt value. Default value is null
-
setPromptType
The type of data of the user-specifiedprompt.- Overrides:
setPromptTypein classSingleSourceAIRequest- Parameters:
promptType- New promptType value. Default value is "text"- Returns:
UserAIRequestinstance, for chaining setter calls
-
getPromptType
The type of data of the user-specifiedprompt.- Overrides:
getPromptTypein classSingleSourceAIRequest- Returns:
- Current promptType value. Default value is "text"
-