update and code refactoring focused on: 1. Adding new documentation pages to the table of contents 2. Restructuring the bot templates documentation 3. Changing keyword syntax from underscore format to space format (e.g., `SET_BOT_MEMORY` → `SET BOT MEMORY`) 4. Updating compiler and keyword registration to support the new space-based syntax 5. Adding new keyword modules (social media, lead scoring, templates, etc.) Refactor BASIC keywords to use spaces instead of underscores Change keyword syntax from underscore format (SET_BOT_MEMORY) to more natural space-separated format (SET BOT MEMORY) throughout the codebase. Key changes: - Update Rhai custom syntax registration to use space tokens - Simplify compiler preprocessing (fewer replacements needed) - Update all template .bas files to use new syntax - Expand documentation with consolidated examples and new sections - Add new keyword modules: social_media, lead_scoring, send_template, core_functions, qrcode, sms, procedures, import_export, llm_macros, on_form_submit
76 lines
3.1 KiB
QBasic
76 lines
3.1 KiB
QBasic
' Employee Management Template - Start Script
|
||
' This script runs when a user first connects to the bot
|
||
' Sets up tools, knowledge base, and provides welcome message
|
||
|
||
' ============================================================================
|
||
' SETUP TOOLS - Register available employee management tools
|
||
' ============================================================================
|
||
|
||
ADD TOOL "add-employee"
|
||
ADD TOOL "update-employee"
|
||
ADD TOOL "search-employee"
|
||
ADD TOOL "employee-directory"
|
||
ADD TOOL "org-chart"
|
||
ADD TOOL "emergency-contacts"
|
||
|
||
' ============================================================================
|
||
' SETUP KNOWLEDGE BASE
|
||
' ============================================================================
|
||
|
||
USE KB "employees.gbkb"
|
||
|
||
' ============================================================================
|
||
' SET CONTEXT FOR AI
|
||
' ============================================================================
|
||
|
||
SET CONTEXT "employee management" AS "You are an HR assistant helping manage employee information. You can help with: adding new employees, updating employee records, searching the employee directory, viewing org charts, and managing emergency contacts. Always maintain confidentiality of employee data."
|
||
|
||
' ============================================================================
|
||
' SETUP SUGGESTIONS
|
||
' ============================================================================
|
||
|
||
CLEAR SUGGESTIONS
|
||
|
||
ADD SUGGESTION "directory" AS "Show me the employee directory"
|
||
ADD SUGGESTION "add" AS "Add a new employee"
|
||
ADD SUGGESTION "search" AS "Search for an employee"
|
||
ADD SUGGESTION "org" AS "Show organization chart"
|
||
ADD SUGGESTION "emergency" AS "View emergency contacts"
|
||
|
||
' ============================================================================
|
||
' WELCOME MESSAGE
|
||
' ============================================================================
|
||
|
||
BEGIN TALK
|
||
👥 **Employee Management System**
|
||
|
||
Welcome! I'm your HR assistant for managing employee information.
|
||
|
||
**What I can help you with:**
|
||
• 📋 View the employee directory
|
||
• ➕ Add new employees to the system
|
||
• 🔍 Search for specific employees
|
||
• 🏢 View the organization chart
|
||
• 🆘 Manage emergency contacts
|
||
• 📊 Generate employee reports
|
||
|
||
Just tell me what you need or select one of the options below!
|
||
END TALK
|
||
|
||
' ============================================================================
|
||
' SYSTEM PROMPT FOR AI INTERACTIONS
|
||
' ============================================================================
|
||
|
||
BEGIN SYSTEM PROMPT
|
||
You are an HR assistant for the Employee Management System. Your responsibilities include:
|
||
|
||
1. Helping users add, update, and search employee records
|
||
2. Maintaining data privacy and confidentiality
|
||
3. Providing accurate employee information when requested
|
||
4. Assisting with organizational structure queries
|
||
5. Managing emergency contact information
|
||
|
||
Always confirm sensitive operations before executing them.
|
||
Never expose sensitive data like salaries or personal IDs without proper authorization.
|
||
Use professional and helpful language.
|
||
END SYSTEM PROMPT
|