Difference between revisions of "Bot Playground/AI/Bot.AI.configure"
From SmartBots Developers Docs
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
− | <onlyinclude> | + | <onlyinclude>Configures AI options to be used in all further communications within the current script.</onlyinclude> |
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
Bot.AI.configure(options) | Bot.AI.configure(options) | ||
Line 11: | Line 11: | ||
{{API Variable Group|Input}} | {{API Variable Group|Input}} | ||
{{API Variable|options|yes}} configuration directives for the AI engine. Format: | {{API Variable|options|yes}} configuration directives for the AI engine. Format: | ||
− | < | + | <syntaxhighlight lang="json"> |
{ | { | ||
// Main configuration instructions for the AI: role, behavior, response rules etc. | // Main configuration instructions for the AI: role, behavior, response rules etc. | ||
Line 25: | Line 25: | ||
// on the sender and bot name. | // on the sender and bot name. | ||
conversationId?: string; | conversationId?: string; | ||
+ | |||
+ | // The amount of history to retain for the conversation. | ||
+ | maxHistoryMessages?: number; | ||
+ | |||
} | } | ||
− | </ | + | </syntaxhighlight> |
{{API Variable Group|Output}} | {{API Variable Group|Output}} | ||
{{API Return none}} | {{API Return none}} |
Latest revision as of 16:47, 12 September 2024
Configures AI options to be used in all further communications within the current script.
Bot.AI.configure(options)
Reference
This command accepts the following parameters:
Variable | Required | Description
| |
---|---|---|---|
Input: | |||
options | yes | configuration directives for the AI engine. Format:
{
// Main configuration instructions for the AI: role, behavior, response rules etc.
instructions?: string;
// If responding to a particular previous AI message of the bot
parentMessageId?: string;
// Maximum number of tokens to generate in response
maxResponseTokens?: number;
// The unique conversation id. Usually generated automatically based
// on the sender and bot name.
conversationId?: string;
// The amount of history to retain for the conversation.
maxHistoryMessages?: number;
}
| |
Output: | |||
result | This function does not return anything |