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 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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdditional messages from the user.static UserAIRequest
getOrCreateRef
(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, 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
-
Constructor Details
-
UserAIRequest
public UserAIRequest() -
UserAIRequest
-
-
Method Details
-
getOrCreateRef
-
setAdditionalMessages
Additional messages from the user. For example, theprompt
may be an image, and additional text from the user about their request can be added to this array.- Overrides:
setAdditionalMessages
in classSingleSourceAIRequest
- Parameters:
additionalMessages
- New additionalMessages value. Default value is null- Returns:
UserAIRequest
instance, for chaining setter calls
-
getAdditionalMessages
Additional messages from the user. For example, theprompt
may be an image, and additional text from the user about their request can be added to this array.- Overrides:
getAdditionalMessages
in 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:
setPrompt
in classSingleSourceAIRequest
- Parameters:
prompt
- New prompt value. Default value is null- Returns:
UserAIRequest
instance, for chaining setter calls
-
getPrompt
The data of the user's request. The type of data is specified by thepromptType
.- Overrides:
getPrompt
in classSingleSourceAIRequest
- Returns:
- Current prompt value. Default value is null
-
setPromptType
The type of data of the user-specifiedprompt
.- Overrides:
setPromptType
in classSingleSourceAIRequest
- Parameters:
promptType
- New promptType value. Default value is "text"- Returns:
UserAIRequest
instance, for chaining setter calls
-
getPromptType
The type of data of the user-specifiedprompt
.- Overrides:
getPromptType
in classSingleSourceAIRequest
- Returns:
- Current promptType value. Default value is "text"
-