Package com.smartgwt.client.ai
Class AIMessage
java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.ai.AIMessage
- All Implemented Interfaces:
HasHandlers
- Direct Known Subclasses:
AIMessageWithSource
An individual message in the list of
AIRequest.messages of an AI request.-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe data for the message.For a message whosetypeis "jpegImage" or "pngImage", how finely the AI should examine the image: "low", "high" or "auto".static AIMessagegetOrCreateRef(JavaScriptObject jsObj) getType()The type of data.setContent(Object content) The data for the message.setImageDetail(String imageDetail) For a message whosetypeis "jpegImage" or "pngImage", how finely the AI should examine the image: "low", "high" or "auto".setType(AIContentType type) The type of data.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
-
AIMessage
public AIMessage() -
AIMessage
-
-
Method Details
-
getOrCreateRef
-
setContent
The data for the message. If thetypeof this message is "jpegImage" or "pngImage", this will be the base64-encoded image data.- Parameters:
content- New content value. Default value is null- Returns:
AIMessageinstance, for chaining setter calls
-
getContent
The data for the message. If thetypeof this message is "jpegImage" or "pngImage", this will be the base64-encoded image data.- Returns:
- Current content value. Default value is null
-
setImageDetail
For a message whosetypeis "jpegImage" or "pngImage", how finely the AI should examine the image: "low", "high" or "auto". Only meaningful for engines that expose such a setting; ignored by the others.When unset, the engine's own default applies, which for most engines downsamples the image substantially. Set "high" when small text in the image must be read - the text in a sketch or wireframe, for instance - and expect a correspondingly higher token cost.
- Parameters:
imageDetail- New imageDetail value. Default value is null- Returns:
AIMessageinstance, for chaining setter calls
-
getImageDetail
For a message whosetypeis "jpegImage" or "pngImage", how finely the AI should examine the image: "low", "high" or "auto". Only meaningful for engines that expose such a setting; ignored by the others.When unset, the engine's own default applies, which for most engines downsamples the image substantially. Set "high" when small text in the image must be read - the text in a sketch or wireframe, for instance - and expect a correspondingly higher token cost.
- Returns:
- Current imageDetail value. Default value is null
-
setType
The type of data.- Parameters:
type- New type value. Default value is "text"- Returns:
AIMessageinstance, for chaining setter calls
-
getType
The type of data.- Returns:
- Current type value. Default value is "text"
-