Difference between revisions of "Bot Playground/AI/Bot.AI.configure"

From SmartBots Developers Docs
Jump to: navigation, search
 
Line 34: Line 34:
 
{{API Return none}}
 
{{API Return none}}
 
{{API Variables Table End}}
 
{{API Variables Table End}}
 +
 +
<blockquote>
 +
*Note: The `instructions` and `maxResponseTokens` settings are hard-coded in user settings. They do not need to be explicitly created for user settings. Instead, these values should be fetched from `userSettings.instructions` and `userSettings.maxResponseTokens` and included in the configuration.
 +
</blockquote>
  
 
{{NavMenu}}
 
{{NavMenu}}

Latest revision as of 11:14, 22 January 2025


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
  • Note: The `instructions` and `maxResponseTokens` settings are hard-coded in user settings. They do not need to be explicitly created for user settings. Instead, these values should be fetched from `userSettings.instructions` and `userSettings.maxResponseTokens` and included in the configuration.