botserver/docs/src/chapter-05/keywords.md

55 lines
1.5 KiB
Markdown
Raw Normal View History

# Keyword Reference
This section provides comprehensive reference for all BASIC keywords available in .gbdialog scripts.
## Categories
### 1. Conversation Keywords
- `TALK` - Send message to user
- `HEAR` - Receive input from user
- `SET_USER` - Change user context
- `SET_CONTEXT` - Store session data
### 2. AI and LLM Keywords
- `LLM` - Generate AI response
- `GET_BOT_MEMORY` - Retrieve bot data
- `SET_BOT_MEMORY` - Store bot data
### 3. Knowledge Base Keywords
- `SET_KB` - Set active knowledge base
- `ADD_KB` - Add knowledge base to session
- `ADD_WEBSITE` - Crawl and index website
### 4. Tool Keywords
- `ADD_TOOL` - Enable tool for session
- `LIST_TOOLS` - Show available tools
- `REMOVE_TOOL` - Disable tool
- `CLEAR_TOOLS` - Remove all tools
### 5. Data Keywords
- `GET` - Retrieve data from URL or file
- `FIND` - Search database tables
- `SET` - Update database records
### 6. Automation Keywords
- `ON` - Create database triggers
- `SET_SCHEDULE` - Schedule automated tasks
### 7. Web Keywords
- `CREATE_SITE` - Generate website
- `CREATE_DRAFT` - Create email draft
- `WEBSITE OF` - Search web content
### 8. Utility Keywords
- `PRINT` - Output debug information
- `WAIT` - Pause execution
- `FORMAT` - Format data values
- `FIRST` - Get first word from text
- `LAST` - Get last word from text
### 9. Loop Keywords
- `FOR EACH` - Iterate over collections
- `EXIT FOR` - Break out of loops
Each keyword is documented in detail in the following pages with syntax, parameters, examples, and usage notes.