public class AIRequest extends RefDataClass
id
factoryCreated, factoryProperties
Constructor and Description |
---|
AIRequest() |
AIRequest(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
CancellationController |
getCancellationController()
If provided, the
CancellationController that will be looked to for whether the AI
request is canceled. |
java.lang.String |
getHistoryConclusion()
When this engine does not support multiple messages, all of the messages of the request must be concatenated together.
|
java.util.Map |
getHistoryDelimiters()
When this engine does not support multiple messages, all of the messages of the request must be concatenated together.
|
java.lang.String |
getHistoryIntroduction()
When this engine does not support multiple messages, all of the messages of the request must be concatenated together.
|
AIMessageWithSource[] |
getMessages()
List of messages forming the request.
|
static AIRequest |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.String |
getPrompt()
Prompt text to AI.
|
java.lang.Integer |
getResponseMaximum()
When the
responseType is "number", the maximum value that the
response may take. |
java.lang.Integer |
getResponseMinimum()
When the
responseType is "number", the minimum value that the
response may take. |
AIContentType |
getResponseType()
The type of content expected from AI.
|
java.lang.Integer |
getTemperature()
A number from 0 to 1 representing how much variability or creativity in responses AI should generate.
|
AIRequest |
setCancellationController(CancellationController cancellationController)
If provided, the
CancellationController that will be looked to for whether the AI
request is canceled. |
AIRequest |
setHistoryConclusion(java.lang.String historyConclusion)
When this engine does not support multiple messages, all of the messages of the request must be concatenated together.
|
AIRequest |
setHistoryDelimiters(java.util.Map historyDelimiters)
When this engine does not support multiple messages, all of the messages of the request must be concatenated together.
|
AIRequest |
setHistoryIntroduction(java.lang.String historyIntroduction)
When this engine does not support multiple messages, all of the messages of the request must be concatenated together.
|
AIRequest |
setMessages(AIMessageWithSource... messages)
List of messages forming the request.
|
AIRequest |
setPrompt(java.lang.String prompt)
Prompt text to AI.
|
AIRequest |
setResponseMaximum(java.lang.Integer responseMaximum)
When the
responseType is "number", the maximum value that the
response may take. |
AIRequest |
setResponseMinimum(java.lang.Integer responseMinimum)
When the
responseType is "number", the minimum value that the
response may take. |
AIRequest |
setResponseType(AIContentType responseType)
The type of content expected from AI.
|
AIRequest |
setTemperature(java.lang.Integer temperature)
A number from 0 to 1 representing how much variability or creativity in responses AI should generate.
|
getRef, getRef, internalSetID
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
public AIRequest()
public AIRequest(com.google.gwt.core.client.JavaScriptObject jsObj)
public static AIRequest getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public AIRequest setCancellationController(CancellationController cancellationController)
CancellationController
that will be looked to for whether the AI
request is canceled.cancellationController
- New cancellationController value. Default value is nullAIRequest
instance, for chaining setter callspublic CancellationController getCancellationController()
CancellationController
that will be looked to for whether the AI
request is canceled.public AIRequest setHistoryConclusion(java.lang.String historyConclusion)
historyConclusion
- New historyConclusion value. Default value is nullAIRequest
instance, for chaining setter callspublic java.lang.String getHistoryConclusion()
public AIRequest setHistoryDelimiters(java.util.Map historyDelimiters)
AIMessageSource
to the delimiter to be used to enclose the content of
the message.historyDelimiters
- New historyDelimiters value. Default value is nullAIRequest
instance, for chaining setter callspublic java.util.Map getHistoryDelimiters()
AIMessageSource
to the delimiter to be used to enclose the content of
the message.public AIRequest setHistoryIntroduction(java.lang.String historyIntroduction)
historyIntroduction
- New historyIntroduction value. Default value is nullAIRequest
instance, for chaining setter callspublic java.lang.String getHistoryIntroduction()
public AIRequest setMessages(AIMessageWithSource... messages)
messages
- New messages value. Default value is nullAIRequest
instance, for chaining setter callspublic AIMessageWithSource[] getMessages()
public AIRequest setPrompt(java.lang.String prompt)
messages
are also provided, then this prompt
is appended as another message with type "text" and source "user" when submitted to AI.prompt
- New prompt value. Default value is nullAIRequest
instance, for chaining setter callspublic java.lang.String getPrompt()
messages
are also provided, then this prompt
is appended as another message with type "text" and source "user" when submitted to AI.public AIRequest setResponseMaximum(java.lang.Integer responseMaximum)
responseType
is "number", the maximum value that the
response may take. If not specified, then there is no maximum.responseMaximum
- New responseMaximum value. Default value is nullAIRequest
instance, for chaining setter callspublic java.lang.Integer getResponseMaximum()
responseType
is "number", the maximum value that the
response may take. If not specified, then there is no maximum.public AIRequest setResponseMinimum(java.lang.Integer responseMinimum)
responseType
is "number", the minimum value that the
response may take. If not specified, then there is no minimum.responseMinimum
- New responseMinimum value. Default value is nullAIRequest
instance, for chaining setter callspublic java.lang.Integer getResponseMinimum()
responseType
is "number", the minimum value that the
response may take. If not specified, then there is no minimum.public AIRequest setResponseType(AIContentType responseType)
If this type is "number", then the response from AI is constrained by responseMinimum
and responseMaximum
.
responseType
- New responseType value. Default value is "text"AIRequest
instance, for chaining setter callspublic AIContentType getResponseType()
If this type is "number", then the response from AI is constrained by responseMinimum
and responseMaximum
.
public AIRequest setTemperature(java.lang.Integer temperature)
temperature
- New temperature value. Default value is nullAIRequest
instance, for chaining setter callspublic java.lang.Integer getTemperature()