Difference between revisions of "Bot Playground/AI"
From SmartBots Developers Docs
(Created page with "AI root {{NavMenu}} __NOTOC__") |
|||
(12 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | AI | + | {{DISPLAYTITLE:SmartBots AI}} |
+ | [https://www.mysmartbots.com/docs/SmartBots_AI SmartBots AI] is a conversation-based AI which can be used with Playground scripts in order to create AI conversations. | ||
+ | |||
+ | == SmartBots AI for developers == | ||
+ | |||
+ | The most convenient way to access SmartBots AI is to use conversations. | ||
+ | |||
+ | You can send "raw" requests to the AI but conversations give you the way to keep track of context (previous messages and responses. | ||
+ | |||
+ | * You create a conversation by calling '''Bot.AI.getConversationByName(residentName)'''. The resulting object may be reused for further communications with AI. | ||
+ | * SmartBots AI keeps track of a context within a conversation. | ||
+ | * Conversation options can be adjusted separately for each conversation. | ||
+ | * Conversations are system-wide, tied to script + bot + specific resident. | ||
+ | |||
+ | == Main concepts == | ||
+ | |||
+ | ; Instructions | ||
+ | : The rules for the bot: how to react, how to role-play, what to know. [https://www.mysmartbots.com/docs/SmartBots_AI/Instructions Check instructions examples] | ||
+ | ; Token | ||
+ | : Each request to SmartBots AI consumes tokens. [[Bot Playground/AI/Tokens|Read more here]] about tokens usage. | ||
+ | |||
+ | == AI commands reference == | ||
+ | |||
+ | {{API_Table_start|Command|Description}} | ||
+ | {{API_Group|Commands}} | ||
+ | {{API_Entry|HTTP Bot Command|Bot.AI.chat}} | ||
+ | {{API_Entry|HTTP Bot Command|Bot.AI.configure}} | ||
+ | {{API_Entry|HTTP Bot Command|Bot.AI.getConversationByName}} | ||
+ | {{API_Entry|HTTP Bot Command|Bot.AI.forgetConversation}} | ||
+ | {{API_Entry|HTTP Bot Command|Conversation.chat}} | ||
+ | {{API_Entry|HTTP Bot Command|Conversation.configure}} | ||
+ | |||
{{NavMenu}} | {{NavMenu}} | ||
__NOTOC__ | __NOTOC__ |
Latest revision as of 15:50, 16 October 2023
SmartBots AI is a conversation-based AI which can be used with Playground scripts in order to create AI conversations.
SmartBots AI for developers
The most convenient way to access SmartBots AI is to use conversations.
You can send "raw" requests to the AI but conversations give you the way to keep track of context (previous messages and responses.
- You create a conversation by calling Bot.AI.getConversationByName(residentName). The resulting object may be reused for further communications with AI.
- SmartBots AI keeps track of a context within a conversation.
- Conversation options can be adjusted separately for each conversation.
- Conversations are system-wide, tied to script + bot + specific resident.
Main concepts
- Instructions
- The rules for the bot: how to react, how to role-play, what to know. Check instructions examples
- Token
- Each request to SmartBots AI consumes tokens. Read more here about tokens usage.
AI commands reference
Command | Description | |
---|---|---|
Commands | ||
Bot.AI.chat | Sends a chat message request to bot AI. | |
Bot.AI.configure | Configures AI options to be used in all further communications within the current script. | |
Bot.AI.getConversationByName | Get/create conversation with a specific resident. If conversation doesn't exist yet, creates it. | |
Bot.AI.forgetConversation | Forget (cancel) conversation of a bot with a specific resident. | |
Conversation.chat | Sends a chat message request to bot AI within a conversation with a specific resident. | |
Conversation.configure | Sets some configuration values for the future usage
|