diff --git a/PROMPT.md b/PROMPT.md index 440cae3e..ce4cf2d0 100644 --- a/PROMPT.md +++ b/PROMPT.md @@ -211,7 +211,7 @@ TALK "Hello, world!" name = HEAR TALK "Welcome, " + name -' Error handling (VB-style) +' Error handling ON ERROR RESUME NEXT result = SOME_OPERATION() IF ERROR THEN diff --git a/TASKS.md b/TASKS.md index 4fa54454..460cabac 100644 --- a/TASKS.md +++ b/TASKS.md @@ -103,7 +103,7 @@ DELETE "temp/report.pdf" ## βœ… IMPLEMENTED: Error Handling -### ON ERROR RESUME NEXT (VB-Style) +### ON ERROR RESUME NEXT (BASIC-style) Now fully implemented in `src/basic/keywords/errors/on_error.rs`: @@ -175,22 +175,25 @@ website-max-depth, website-max-pages ## πŸ“‹ REMAINING TASKS ### Priority 1 - Documentation Updates -- [ ] Update all model names to generic/current versions (17 files) -- [ ] Update keyword examples to use spaces not underscores -- [ ] Fix `SEND EMAIL` examples to use `SEND MAIL` syntax -- [ ] Document unified `DELETE` keyword behavior -- [ ] Add `ON ERROR RESUME NEXT` to error handling docs +- [x] Update all model names to generic/current versions (17 files) +- [x] Update keyword examples to use spaces not underscores +- [x] Fix `SEND EMAIL` examples to use `SEND MAIL` syntax +- [x] Document unified `DELETE` keyword behavior (already documented in `keyword-delete.md`) +- [x] Add `ON ERROR RESUME NEXT` to error handling docs (created `keyword-on-error.md`) ### Priority 2 - New Documentation Needed -- [ ] Full config.csv parameter reference -- [ ] SMS provider configuration (Twilio, Vonage, etc.) -- [ ] Teams/WhatsApp channel setup -- [ ] SOAP authentication configuration +- [x] Full config.csv parameter reference (expanded `parameters.md` with all SMS, WhatsApp params) +- [x] SMS provider configuration (created `sms-providers.md` - Twilio, AWS SNS, Vonage, MessageBird) +- [x] Teams/WhatsApp channel setup (created `teams-channel.md` and `whatsapp-channel.md`) +- [x] SOAP authentication configuration (expanded `keyword-soap.md` with WS-Security, OAuth, certs) -### Priority 3 - Consider Implementing -- [ ] `POST url, data WITH headers` - HTTP with inline headers -- [ ] `GET url WITH params` - Query parameters support -- [ ] `WITH ... END WITH` blocks for object initialization +### Priority 3 - Structure Cleanup +- [x] Renamed folders with proper numbering (01-introduction, 02-templates, etc.) +- [x] Removed VB/Visual Basic references (now BASIC only) +- [x] Deleted empty `04-ui-legacy` folder +- [x] Deleted `17-appendix-env-vars` (only VAULT_* vars are real, rest was lies) +- [x] Fixed vbs code blocks to use `basic` syntax +- [x] Updated SUMMARY.md with new folder paths --- @@ -212,11 +215,19 @@ website-max-depth, website-max-pages | Category | Count | |----------|-------| -| Files with old model names | 17 | +| Files with old model names | 0 (fixed) | | Stub files completed | 8 | -| Keywords fixed (underscoreβ†’space) | 6 | -| Error handling keywords added | 7 | -| Config params documented | 30+ | +| Keywords fixed (underscoreβ†’space) | 10 | +| SEND EMAIL β†’ SEND MAIL | 9 files fixed | +| Error handling keywords added | 8 | +| Error handling doc created | `keyword-on-error.md` | +| Config params documented | 50+ | +| New channel docs created | `teams-channel.md`, `whatsapp-channel.md` | +| New provider docs created | `sms-providers.md` | +| SOAP auth expanded | WS-Security, OAuth, certificates | +| VB references removed | All files now use BASIC only | +| Folders renamed | `01-introduction`, `02-templates`, etc. | +| Deleted trash | `04-ui-legacy`, `17-appendix-env-vars` | --- diff --git a/src/chapter-01/README.md b/src/01-introduction/README.md similarity index 100% rename from src/chapter-01/README.md rename to src/01-introduction/README.md diff --git a/src/chapter-01/assets/bootstrap-process.svg.backup b/src/01-introduction/assets/bootstrap-process.svg.backup similarity index 100% rename from src/chapter-01/assets/bootstrap-process.svg.backup rename to src/01-introduction/assets/bootstrap-process.svg.backup diff --git a/src/chapter-01/assets/quick-start-bootstrap.svg.backup b/src/01-introduction/assets/quick-start-bootstrap.svg.backup similarity index 100% rename from src/chapter-01/assets/quick-start-bootstrap.svg.backup rename to src/01-introduction/assets/quick-start-bootstrap.svg.backup diff --git a/src/chapter-01/assets/session-manager.svg.backup b/src/01-introduction/assets/session-manager.svg.backup similarity index 100% rename from src/chapter-01/assets/session-manager.svg.backup rename to src/01-introduction/assets/session-manager.svg.backup diff --git a/src/chapter-01/assets/session-states.svg.backup b/src/01-introduction/assets/session-states.svg.backup similarity index 100% rename from src/chapter-01/assets/session-states.svg.backup rename to src/01-introduction/assets/session-states.svg.backup diff --git a/src/chapter-01/assets/tool-execution-flow.svg.backup b/src/01-introduction/assets/tool-execution-flow.svg.backup similarity index 100% rename from src/chapter-01/assets/tool-execution-flow.svg.backup rename to src/01-introduction/assets/tool-execution-flow.svg.backup diff --git a/src/chapter-01/first-conversation.md b/src/01-introduction/first-conversation.md similarity index 100% rename from src/chapter-01/first-conversation.md rename to src/01-introduction/first-conversation.md diff --git a/src/chapter-01/installation.md b/src/01-introduction/installation.md similarity index 100% rename from src/chapter-01/installation.md rename to src/01-introduction/installation.md diff --git a/src/chapter-01/overview.md b/src/01-introduction/overview.md similarity index 100% rename from src/chapter-01/overview.md rename to src/01-introduction/overview.md diff --git a/src/chapter-01/quick-start.md b/src/01-introduction/quick-start.md similarity index 100% rename from src/chapter-01/quick-start.md rename to src/01-introduction/quick-start.md diff --git a/src/chapter-01/sessions.md b/src/01-introduction/sessions.md similarity index 100% rename from src/chapter-01/sessions.md rename to src/01-introduction/sessions.md diff --git a/src/chapter-02/README.md b/src/02-templates/README.md similarity index 100% rename from src/chapter-02/README.md rename to src/02-templates/README.md diff --git a/src/chapter-02/assets/package-structure.svg.backup b/src/02-templates/assets/package-structure.svg.backup similarity index 100% rename from src/chapter-02/assets/package-structure.svg.backup rename to src/02-templates/assets/package-structure.svg.backup diff --git a/src/chapter-02/assets/template-deployment-flow.svg.backup b/src/02-templates/assets/template-deployment-flow.svg.backup similarity index 100% rename from src/chapter-02/assets/template-deployment-flow.svg.backup rename to src/02-templates/assets/template-deployment-flow.svg.backup diff --git a/src/chapter-02/gbai.md b/src/02-templates/gbai.md similarity index 100% rename from src/chapter-02/gbai.md rename to src/02-templates/gbai.md diff --git a/src/chapter-02/gbdialog.md b/src/02-templates/gbdialog.md similarity index 100% rename from src/chapter-02/gbdialog.md rename to src/02-templates/gbdialog.md diff --git a/src/chapter-02/gbdrive.md b/src/02-templates/gbdrive.md similarity index 100% rename from src/chapter-02/gbdrive.md rename to src/02-templates/gbdrive.md diff --git a/src/chapter-02/gbkb.md b/src/02-templates/gbkb.md similarity index 100% rename from src/chapter-02/gbkb.md rename to src/02-templates/gbkb.md diff --git a/src/chapter-02/gbot.md b/src/02-templates/gbot.md similarity index 98% rename from src/chapter-02/gbot.md rename to src/02-templates/gbot.md index e3da4215..7315a698 100644 --- a/src/chapter-02/gbot.md +++ b/src/02-templates/gbot.md @@ -22,7 +22,7 @@ These identity settings matter because they shape user expectations. A bot named ## Language Model Settings -LLM configuration represents perhaps the most important settings in your bot. The llm_provider parameter specifies which AI service powers your bot, supporting options like OpenAI, Azure OpenAI, or local model servers. The llm_model parameter identifies the specific model to use, such as GPT-4 or Claude 3. +LLM configuration represents perhaps the most important settings in your bot. The llm_provider parameter specifies which AI service powers your bot, supporting options like OpenAI, Azure OpenAI, or local model servers. The llm_model parameter identifies the specific model to use, such as GPT-5, Claude Sonnet 4.5, or a local GGUF model. Response characteristics are controlled through several parameters. The temperature setting affects response creativity, with lower values producing more focused and deterministic outputs while higher values allow more varied and creative responses. The max_tokens parameter limits response length, preventing runaway generation and managing costs for cloud-based providers. diff --git a/src/chapter-02/gbtheme.md b/src/02-templates/gbtheme.md similarity index 100% rename from src/chapter-02/gbtheme.md rename to src/02-templates/gbtheme.md diff --git a/src/chapter-02/summary.md b/src/02-templates/summary.md similarity index 100% rename from src/chapter-02/summary.md rename to src/02-templates/summary.md diff --git a/src/chapter-02/template-analytics.md b/src/02-templates/template-analytics.md similarity index 98% rename from src/chapter-02/template-analytics.md rename to src/02-templates/template-analytics.md index c4270db0..147fb747 100644 --- a/src/chapter-02/template-analytics.md +++ b/src/02-templates/template-analytics.md @@ -356,8 +356,8 @@ insights = LLM "Analyze this data and provide 3-5 key insights: " + JSON(report_ errorRate = SUM(errors, "count") / SUM(messages, "count") * 100 IF errorRate > 5 THEN - SEND EMAIL admin_email, "High Error Rate Alert", - "Error rate is " + errorRate + "%, above 5% threshold." + SEND MAIL admin_email, "High Error Rate Alert", + "Error rate is " + errorRate + "%, above 5% threshold.", [] END IF ``` diff --git a/src/chapter-02/template-api-client.md b/src/02-templates/template-api-client.md similarity index 100% rename from src/chapter-02/template-api-client.md rename to src/02-templates/template-api-client.md diff --git a/src/chapter-02/template-attendance-crm.md b/src/02-templates/template-attendance-crm.md similarity index 100% rename from src/chapter-02/template-attendance-crm.md rename to src/02-templates/template-attendance-crm.md diff --git a/src/chapter-02/template-bi.md b/src/02-templates/template-bi.md similarity index 100% rename from src/chapter-02/template-bi.md rename to src/02-templates/template-bi.md diff --git a/src/chapter-02/template-crawler.md b/src/02-templates/template-crawler.md similarity index 98% rename from src/chapter-02/template-crawler.md rename to src/02-templates/template-crawler.md index c81da108..e4c5145e 100644 --- a/src/chapter-02/template-crawler.md +++ b/src/02-templates/template-crawler.md @@ -266,7 +266,7 @@ previous = GET BOT MEMORY "last_content" current = GET "https://news.example.com" IF current <> previous THEN - SEND EMAIL "admin@company.com", "Website Changed", "The monitored page has been updated." + SEND MAIL "admin@company.com", "Website Changed", "The monitored page has been updated.", [] SET BOT MEMORY "last_content", current END IF ``` diff --git a/src/chapter-02/template-crm-contacts.md b/src/02-templates/template-crm-contacts.md similarity index 100% rename from src/chapter-02/template-crm-contacts.md rename to src/02-templates/template-crm-contacts.md diff --git a/src/chapter-02/template-crm.md b/src/02-templates/template-crm.md similarity index 98% rename from src/chapter-02/template-crm.md rename to src/02-templates/template-crm.md index 91ddcc74..1daf4935 100644 --- a/src/chapter-02/template-crm.md +++ b/src/02-templates/template-crm.md @@ -375,8 +375,8 @@ proposal = GENERATE FROM TEMPLATE "proposal_template.docx" WITH { "valid_until": quote.valid_until } -SEND EMAIL contact.email, "Proposal: " + opportunity.name, - "Please find attached our proposal.", ATTACHMENT proposal +SEND MAIL contact.email, "Proposal: " + opportunity.name, + "Please find attached our proposal.", [proposal] ``` --- diff --git a/src/chapter-02/template-law.md b/src/02-templates/template-law.md similarity index 99% rename from src/chapter-02/template-law.md rename to src/02-templates/template-law.md index bf615558..2af66174 100644 --- a/src/chapter-02/template-law.md +++ b/src/02-templates/template-law.md @@ -262,7 +262,7 @@ END IF ' Email case summary to team summary = LLM "Summarize the key points of this case in 3 paragraphs: " + text -SEND EMAIL "legal-team@firm.com", "Case " + cod + " Summary", summary +SEND MAIL "legal-team@firm.com", "Case " + cod + " Summary", summary, [] TALK "Summary sent to legal team." ``` diff --git a/src/chapter-02/template-llm-server.md b/src/02-templates/template-llm-server.md similarity index 99% rename from src/chapter-02/template-llm-server.md rename to src/02-templates/template-llm-server.md index 092e31bd..9f88a3fd 100644 --- a/src/chapter-02/template-llm-server.md +++ b/src/02-templates/template-llm-server.md @@ -140,7 +140,7 @@ Configure in `llm-server.gbot/config.csv`: | Parameter | Description | Example | |-----------|-------------|---------| | `LLM Provider` | AI model provider | `openai` | -| `LLM Model` | Specific model | `gpt-4` | +| `LLM Model` | Specific model | `gpt-5` | | `Max Tokens` | Response length limit | `500` | | `Temperature` | Response creativity | `0.3` | | `API Mode` | Enable API mode | `true` | @@ -369,7 +369,7 @@ END SYSTEM PROMPT ```bash LLM_PROVIDER=openai LLM_API_KEY=sk-... -LLM_MODEL=gpt-4 +LLM_MODEL=gpt-5 API_RATE_LIMIT=100 SESSION_TIMEOUT=3600 ``` diff --git a/src/chapter-02/template-llm-tools.md b/src/02-templates/template-llm-tools.md similarity index 99% rename from src/chapter-02/template-llm-tools.md rename to src/02-templates/template-llm-tools.md index 29fd89dd..7f62302a 100644 --- a/src/chapter-02/template-llm-tools.md +++ b/src/02-templates/template-llm-tools.md @@ -250,7 +250,7 @@ PARAM message AS STRING DESCRIPTION "Email body content" DESCRIPTION "Send an email notification to a customer" -SEND EMAIL recipient, subject, message +SEND MAIL recipient, subject, message, [] WITH result sent = true @@ -332,7 +332,7 @@ Configure in `llm-tools.gbot/config.csv`: | Parameter | Description | Example | |-----------|-------------|---------| | `LLM Provider` | AI provider | `openai` | -| `LLM Model` | Model for tool calls | `gpt-4` | +| `LLM Model` | Model for tool calls | `gpt-4o` | | `Tool Timeout` | Max tool execution time | `30` | | `Max Tool Calls` | Limit per conversation | `10` | diff --git a/src/chapter-02/template-marketing.md b/src/02-templates/template-marketing.md similarity index 99% rename from src/chapter-02/template-marketing.md rename to src/02-templates/template-marketing.md index 9697a40b..731d779a 100644 --- a/src/chapter-02/template-marketing.md +++ b/src/02-templates/template-marketing.md @@ -339,7 +339,7 @@ END IF FOR EACH contact IN contacts personalized_body = REPLACE(body, "{name}", contact.name) - SEND EMAIL contact.email, subject, personalized_body + SEND MAIL contact.email, subject, personalized_body, [] WITH log campaign_id = campaign_id diff --git a/src/chapter-02/template-office.md b/src/02-templates/template-office.md similarity index 100% rename from src/chapter-02/template-office.md rename to src/02-templates/template-office.md diff --git a/src/chapter-02/template-reminder.md b/src/02-templates/template-reminder.md similarity index 98% rename from src/chapter-02/template-reminder.md rename to src/02-templates/template-reminder.md index 38e7abc0..60f54457 100644 --- a/src/chapter-02/template-reminder.md +++ b/src/02-templates/template-reminder.md @@ -258,7 +258,7 @@ SWITCH notify CASE "chat" ' Default chat notification CASE "email" - SEND EMAIL email, "Reminder: " + subject, message + SEND MAIL email, "Reminder: " + subject, message, [] CASE "sms" SEND SMS phone, "Reminder: " + subject CASE "slack" @@ -302,7 +302,7 @@ PARAM priority AS STRING LIKE "high" DESCRIPTION "Priority: low, medium, high" O IF priority = "high" THEN ' Send via multiple channels - SEND EMAIL email, "πŸ”΄ URGENT: " + subject, message + SEND MAIL email, "πŸ”΄ URGENT: " + subject, message, [] SEND SMS phone, "URGENT: " + subject END IF ``` diff --git a/src/chapter-02/template-samples.md b/src/02-templates/template-samples.md similarity index 100% rename from src/chapter-02/template-samples.md rename to src/02-templates/template-samples.md diff --git a/src/chapter-02/template-template.md b/src/02-templates/template-template.md similarity index 100% rename from src/chapter-02/template-template.md rename to src/02-templates/template-template.md diff --git a/src/chapter-02/templates.md b/src/02-templates/templates.md similarity index 99% rename from src/chapter-02/templates.md rename to src/02-templates/templates.md index cc45ab6d..4b75d289 100644 --- a/src/chapter-02/templates.md +++ b/src/02-templates/templates.md @@ -133,7 +133,7 @@ Edit `template-name.gbot/config.csv`: name,value bot-name,My Custom Bot welcome-message,Hello! How can I help? -llm-model,gpt-4 +llm-model,model.gguf temperature,0.7 ``` diff --git a/src/chapter-03/README.md b/src/03-knowledge-base/README.md similarity index 100% rename from src/chapter-03/README.md rename to src/03-knowledge-base/README.md diff --git a/src/chapter-03/assets/caching-architecture.svg.backup b/src/03-knowledge-base/assets/caching-architecture.svg.backup similarity index 100% rename from src/chapter-03/assets/caching-architecture.svg.backup rename to src/03-knowledge-base/assets/caching-architecture.svg.backup diff --git a/src/chapter-03/assets/context-window.svg.backup b/src/03-knowledge-base/assets/context-window.svg.backup similarity index 100% rename from src/chapter-03/assets/context-window.svg.backup rename to src/03-knowledge-base/assets/context-window.svg.backup diff --git a/src/chapter-03/assets/kb-architecture-pipeline.svg.backup b/src/03-knowledge-base/assets/kb-architecture-pipeline.svg.backup similarity index 100% rename from src/chapter-03/assets/kb-architecture-pipeline.svg.backup rename to src/03-knowledge-base/assets/kb-architecture-pipeline.svg.backup diff --git a/src/chapter-03/assets/search-pipeline.svg.backup b/src/03-knowledge-base/assets/search-pipeline.svg.backup similarity index 100% rename from src/chapter-03/assets/search-pipeline.svg.backup rename to src/03-knowledge-base/assets/search-pipeline.svg.backup diff --git a/src/chapter-03/assets/storage-breakdown.svg.backup b/src/03-knowledge-base/assets/storage-breakdown.svg.backup similarity index 100% rename from src/chapter-03/assets/storage-breakdown.svg.backup rename to src/03-knowledge-base/assets/storage-breakdown.svg.backup diff --git a/src/chapter-03/assets/storage-multiplication.svg.backup b/src/03-knowledge-base/assets/storage-multiplication.svg.backup similarity index 100% rename from src/chapter-03/assets/storage-multiplication.svg.backup rename to src/03-knowledge-base/assets/storage-multiplication.svg.backup diff --git a/src/chapter-03/assets/technical-specs.svg.backup b/src/03-knowledge-base/assets/technical-specs.svg.backup similarity index 100% rename from src/chapter-03/assets/technical-specs.svg.backup rename to src/03-knowledge-base/assets/technical-specs.svg.backup diff --git a/src/chapter-03/caching.md b/src/03-knowledge-base/caching.md similarity index 100% rename from src/chapter-03/caching.md rename to src/03-knowledge-base/caching.md diff --git a/src/chapter-03/episodic-memory.md b/src/03-knowledge-base/episodic-memory.md similarity index 100% rename from src/chapter-03/episodic-memory.md rename to src/03-knowledge-base/episodic-memory.md diff --git a/src/chapter-03/indexing.md b/src/03-knowledge-base/indexing.md similarity index 100% rename from src/chapter-03/indexing.md rename to src/03-knowledge-base/indexing.md diff --git a/src/chapter-03/kb-and-tools.md b/src/03-knowledge-base/kb-and-tools.md similarity index 100% rename from src/chapter-03/kb-and-tools.md rename to src/03-knowledge-base/kb-and-tools.md diff --git a/src/chapter-03/semantic-search.md b/src/03-knowledge-base/semantic-search.md similarity index 100% rename from src/chapter-03/semantic-search.md rename to src/03-knowledge-base/semantic-search.md diff --git a/src/chapter-03/summary.md b/src/03-knowledge-base/summary.md similarity index 100% rename from src/chapter-03/summary.md rename to src/03-knowledge-base/summary.md diff --git a/src/chapter-03/vector-collections.md b/src/03-knowledge-base/vector-collections.md similarity index 100% rename from src/chapter-03/vector-collections.md rename to src/03-knowledge-base/vector-collections.md diff --git a/src/chapter-04-gbui/README.md b/src/04-gbui/README.md similarity index 100% rename from src/chapter-04-gbui/README.md rename to src/04-gbui/README.md diff --git a/src/chapter-04-gbui/admin-user-views.md b/src/04-gbui/admin-user-views.md similarity index 100% rename from src/chapter-04-gbui/admin-user-views.md rename to src/04-gbui/admin-user-views.md diff --git a/src/chapter-04-gbui/apps/README.md b/src/04-gbui/apps/README.md similarity index 97% rename from src/chapter-04-gbui/apps/README.md rename to src/04-gbui/apps/README.md index 24faffa2..3acca69d 100644 --- a/src/chapter-04-gbui/apps/README.md +++ b/src/04-gbui/apps/README.md @@ -38,7 +38,7 @@ Each application in the Suite has its own dedicated documentation with: | App | Description | Documentation | |-----|-------------|---------------| -| 🎨 **Designer** | Visual dialog builder (VB6-style) | [designer.md](./designer.md) | +| 🎨 **Designer** | Visual dialog builder | [designer.md](./designer.md) | | πŸ“š **Sources** | Prompts, templates, and models | [sources.md](./sources.md) | | πŸ›‘οΈ **Compliance** | Security scanner | [compliance.md](./compliance.md) | diff --git a/src/chapter-04-gbui/apps/analytics.md b/src/04-gbui/apps/analytics.md similarity index 97% rename from src/chapter-04-gbui/apps/analytics.md rename to src/04-gbui/apps/analytics.md index 504ea31c..87f5a19e 100644 --- a/src/chapter-04-gbui/apps/analytics.md +++ b/src/04-gbui/apps/analytics.md @@ -397,11 +397,9 @@ report = GENERATE REPORT "Weekly Metrics" FOR "last 7 days" recipients = ["ceo@company.com", "team@company.com"] -FOR EACH email IN recipients - SEND EMAIL TO email - SUBJECT "Weekly Metrics Report - " + TODAY - BODY "Please find attached the weekly metrics report." - ATTACHMENT report.pdf +FOR EACH recipient IN recipients + SEND MAIL recipient, "Weekly Metrics Report - " + TODAY, + "Please find attached the weekly metrics report.", [report.pdf] NEXT LOG "Weekly report sent to " + COUNT(recipients) + " recipients" diff --git a/src/chapter-04-gbui/apps/calendar.md b/src/04-gbui/apps/calendar.md similarity index 100% rename from src/chapter-04-gbui/apps/calendar.md rename to src/04-gbui/apps/calendar.md diff --git a/src/chapter-04-gbui/apps/chat.md b/src/04-gbui/apps/chat.md similarity index 100% rename from src/chapter-04-gbui/apps/chat.md rename to src/04-gbui/apps/chat.md diff --git a/src/chapter-04-gbui/apps/compliance-api.md b/src/04-gbui/apps/compliance-api.md similarity index 100% rename from src/chapter-04-gbui/apps/compliance-api.md rename to src/04-gbui/apps/compliance-api.md diff --git a/src/chapter-04-gbui/apps/compliance.md b/src/04-gbui/apps/compliance.md similarity index 100% rename from src/chapter-04-gbui/apps/compliance.md rename to src/04-gbui/apps/compliance.md diff --git a/src/chapter-04-gbui/apps/designer.md b/src/04-gbui/apps/designer.md similarity index 100% rename from src/chapter-04-gbui/apps/designer.md rename to src/04-gbui/apps/designer.md diff --git a/src/chapter-04-gbui/apps/drive.md b/src/04-gbui/apps/drive.md similarity index 100% rename from src/chapter-04-gbui/apps/drive.md rename to src/04-gbui/apps/drive.md diff --git a/src/chapter-04-gbui/apps/mail.md b/src/04-gbui/apps/mail.md similarity index 100% rename from src/chapter-04-gbui/apps/mail.md rename to src/04-gbui/apps/mail.md diff --git a/src/chapter-04-gbui/apps/meet.md b/src/04-gbui/apps/meet.md similarity index 100% rename from src/chapter-04-gbui/apps/meet.md rename to src/04-gbui/apps/meet.md diff --git a/src/chapter-04-gbui/apps/paper.md b/src/04-gbui/apps/paper.md similarity index 100% rename from src/chapter-04-gbui/apps/paper.md rename to src/04-gbui/apps/paper.md diff --git a/src/chapter-04-gbui/apps/player.md b/src/04-gbui/apps/player.md similarity index 100% rename from src/chapter-04-gbui/apps/player.md rename to src/04-gbui/apps/player.md diff --git a/src/chapter-04-gbui/apps/research.md b/src/04-gbui/apps/research.md similarity index 100% rename from src/chapter-04-gbui/apps/research.md rename to src/04-gbui/apps/research.md diff --git a/src/chapter-04-gbui/apps/sources.md b/src/04-gbui/apps/sources.md similarity index 99% rename from src/chapter-04-gbui/apps/sources.md rename to src/04-gbui/apps/sources.md index dc1d53ea..793c3856 100644 --- a/src/chapter-04-gbui/apps/sources.md +++ b/src/04-gbui/apps/sources.md @@ -52,7 +52,7 @@ Click the **βš™οΈ** icon on any bot to configure: | Setting | Description | |---------|-------------| | **Provider** | AI provider (OpenAI, Azure, etc.) | -| **Model** | Model to use (GPT-4, etc.) | +| **Model** | Model to use (GPT-5, Claude Sonnet 4.5, local GGUF, etc.) | | **Temperature** | Creativity level (0 = focused, 1 = creative) | | **Max Tokens** | Maximum response length | | **System Prompt** | Bot personality and instructions | diff --git a/src/chapter-04-gbui/apps/suite.md b/src/04-gbui/apps/suite.md similarity index 100% rename from src/chapter-04-gbui/apps/suite.md rename to src/04-gbui/apps/suite.md diff --git a/src/chapter-04-gbui/apps/tasks.md b/src/04-gbui/apps/tasks.md similarity index 100% rename from src/chapter-04-gbui/apps/tasks.md rename to src/04-gbui/apps/tasks.md diff --git a/src/chapter-04-gbui/console-mode.md b/src/04-gbui/console-mode.md similarity index 100% rename from src/chapter-04-gbui/console-mode.md rename to src/04-gbui/console-mode.md diff --git a/src/chapter-04-gbui/how-to/README.md b/src/04-gbui/how-to/README.md similarity index 100% rename from src/chapter-04-gbui/how-to/README.md rename to src/04-gbui/how-to/README.md diff --git a/src/chapter-04-gbui/how-to/add-kb-documents.md b/src/04-gbui/how-to/add-kb-documents.md similarity index 100% rename from src/chapter-04-gbui/how-to/add-kb-documents.md rename to src/04-gbui/how-to/add-kb-documents.md diff --git a/src/chapter-04-gbui/how-to/connect-whatsapp.md b/src/04-gbui/how-to/connect-whatsapp.md similarity index 100% rename from src/chapter-04-gbui/how-to/connect-whatsapp.md rename to src/04-gbui/how-to/connect-whatsapp.md diff --git a/src/chapter-04-gbui/how-to/create-first-bot.md b/src/04-gbui/how-to/create-first-bot.md similarity index 100% rename from src/chapter-04-gbui/how-to/create-first-bot.md rename to src/04-gbui/how-to/create-first-bot.md diff --git a/src/chapter-04-gbui/how-to/monitor-sessions.md b/src/04-gbui/how-to/monitor-sessions.md similarity index 100% rename from src/chapter-04-gbui/how-to/monitor-sessions.md rename to src/04-gbui/how-to/monitor-sessions.md diff --git a/src/chapter-04-gbui/how-to/write-first-dialog.md b/src/04-gbui/how-to/write-first-dialog.md similarity index 100% rename from src/chapter-04-gbui/how-to/write-first-dialog.md rename to src/04-gbui/how-to/write-first-dialog.md diff --git a/src/chapter-04-gbui/htmx-architecture.md b/src/04-gbui/htmx-architecture.md similarity index 100% rename from src/chapter-04-gbui/htmx-architecture.md rename to src/04-gbui/htmx-architecture.md diff --git a/src/chapter-04-gbui/monitoring.md b/src/04-gbui/monitoring.md similarity index 100% rename from src/chapter-04-gbui/monitoring.md rename to src/04-gbui/monitoring.md diff --git a/src/chapter-04-gbui/single-gbui.md b/src/04-gbui/single-gbui.md similarity index 100% rename from src/chapter-04-gbui/single-gbui.md rename to src/04-gbui/single-gbui.md diff --git a/src/chapter-04-gbui/suite-manual.md b/src/04-gbui/suite-manual.md similarity index 99% rename from src/chapter-04-gbui/suite-manual.md rename to src/04-gbui/suite-manual.md index 22ff5980..32bc0bf6 100644 --- a/src/chapter-04-gbui/suite-manual.md +++ b/src/04-gbui/suite-manual.md @@ -595,7 +595,7 @@ Click **Export** to download reports as: ### What Designer Does -Designer lets you create bot conversations visually - like VB6 form designer, but for conversations. Drag and drop blocks to build dialogs without coding. +Designer lets you create bot conversations visually. Drag and drop blocks to build dialogs without coding. ### The Designer Interface diff --git a/src/chapter-04-gbui/ui-structure.md b/src/04-gbui/ui-structure.md similarity index 100% rename from src/chapter-04-gbui/ui-structure.md rename to src/04-gbui/ui-structure.md diff --git a/src/chapter-05-gbtheme/README.md b/src/05-gbtheme/README.md similarity index 100% rename from src/chapter-05-gbtheme/README.md rename to src/05-gbtheme/README.md diff --git a/src/chapter-05-gbtheme/css.md b/src/05-gbtheme/css.md similarity index 100% rename from src/chapter-05-gbtheme/css.md rename to src/05-gbtheme/css.md diff --git a/src/chapter-05-gbtheme/structure.md b/src/05-gbtheme/structure.md similarity index 100% rename from src/chapter-05-gbtheme/structure.md rename to src/05-gbtheme/structure.md diff --git a/src/chapter-06-gbdialog/README.md b/src/06-gbdialog/README.md similarity index 100% rename from src/chapter-06-gbdialog/README.md rename to src/06-gbdialog/README.md diff --git a/src/chapter-06-gbdialog/assets/basic-execution-flow.svg.backup b/src/06-gbdialog/assets/basic-execution-flow.svg.backup similarity index 100% rename from src/chapter-06-gbdialog/assets/basic-execution-flow.svg.backup rename to src/06-gbdialog/assets/basic-execution-flow.svg.backup diff --git a/src/chapter-06-gbdialog/basic-vs-automation-tools.md b/src/06-gbdialog/basic-vs-automation-tools.md similarity index 98% rename from src/chapter-06-gbdialog/basic-vs-automation-tools.md rename to src/06-gbdialog/basic-vs-automation-tools.md index 58d4a489..fd1a2fe0 100644 --- a/src/chapter-06-gbdialog/basic-vs-automation-tools.md +++ b/src/06-gbdialog/basic-vs-automation-tools.md @@ -22,7 +22,7 @@ General Bots BASIC provides a conversational-first approach to automation. This | **WhatsApp Native** | Plugin | Plugin | Plugin | Plugin | βœ… Built-in | | **Telegram Native** | Plugin | Plugin | Plugin | ❌ | βœ… Built-in | | **Multi-Channel** | Limited | Limited | Limited | Limited | βœ… Native | -| **LLM Integration** | Plugin | Plugin | Plugin | GPT-4 | βœ… Any model | +| **LLM Integration** | Plugin | Plugin | Plugin | GPT-5 | βœ… Any model | | **Self-Hosted** | ❌ | βœ… | ❌ | ❌ | βœ… | | **Open Source** | ❌ | βœ… | ❌ | ❌ | βœ… AGPL | diff --git a/src/chapter-06-gbdialog/basics.md b/src/06-gbdialog/basics.md similarity index 100% rename from src/chapter-06-gbdialog/basics.md rename to src/06-gbdialog/basics.md diff --git a/src/chapter-06-gbdialog/examples-consolidated.md b/src/06-gbdialog/examples-consolidated.md similarity index 100% rename from src/chapter-06-gbdialog/examples-consolidated.md rename to src/06-gbdialog/examples-consolidated.md diff --git a/src/chapter-06-gbdialog/keyword-add-bot.md b/src/06-gbdialog/keyword-add-bot.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-add-bot.md rename to src/06-gbdialog/keyword-add-bot.md diff --git a/src/chapter-06-gbdialog/keyword-add-member.md b/src/06-gbdialog/keyword-add-member.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-add-member.md rename to src/06-gbdialog/keyword-add-member.md diff --git a/src/chapter-06-gbdialog/keyword-add-suggestion.md b/src/06-gbdialog/keyword-add-suggestion.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-add-suggestion.md rename to src/06-gbdialog/keyword-add-suggestion.md diff --git a/src/chapter-06-gbdialog/keyword-aggregate.md b/src/06-gbdialog/keyword-aggregate.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-aggregate.md rename to src/06-gbdialog/keyword-aggregate.md diff --git a/src/chapter-06-gbdialog/keyword-book.md b/src/06-gbdialog/keyword-book.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-book.md rename to src/06-gbdialog/keyword-book.md diff --git a/src/chapter-06-gbdialog/keyword-bot-reflection.md b/src/06-gbdialog/keyword-bot-reflection.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-bot-reflection.md rename to src/06-gbdialog/keyword-bot-reflection.md diff --git a/src/chapter-06-gbdialog/keyword-card.md b/src/06-gbdialog/keyword-card.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-card.md rename to src/06-gbdialog/keyword-card.md diff --git a/src/chapter-06-gbdialog/keyword-clear-kb.md b/src/06-gbdialog/keyword-clear-kb.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-clear-kb.md rename to src/06-gbdialog/keyword-clear-kb.md diff --git a/src/chapter-06-gbdialog/keyword-clear-tools.md b/src/06-gbdialog/keyword-clear-tools.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-clear-tools.md rename to src/06-gbdialog/keyword-clear-tools.md diff --git a/src/chapter-06-gbdialog/keyword-compress.md b/src/06-gbdialog/keyword-compress.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-compress.md rename to src/06-gbdialog/keyword-compress.md diff --git a/src/chapter-06-gbdialog/keyword-copy.md b/src/06-gbdialog/keyword-copy.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-copy.md rename to src/06-gbdialog/keyword-copy.md diff --git a/src/chapter-06-gbdialog/keyword-create-draft.md b/src/06-gbdialog/keyword-create-draft.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-create-draft.md rename to src/06-gbdialog/keyword-create-draft.md diff --git a/src/chapter-06-gbdialog/keyword-create-site.md b/src/06-gbdialog/keyword-create-site.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-create-site.md rename to src/06-gbdialog/keyword-create-site.md diff --git a/src/chapter-06-gbdialog/keyword-create-task.md b/src/06-gbdialog/keyword-create-task.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-create-task.md rename to src/06-gbdialog/keyword-create-task.md diff --git a/src/chapter-06-gbdialog/keyword-delegate-to-bot.md b/src/06-gbdialog/keyword-delegate-to-bot.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-delegate-to-bot.md rename to src/06-gbdialog/keyword-delegate-to-bot.md diff --git a/src/chapter-06-gbdialog/keyword-delete-file.md b/src/06-gbdialog/keyword-delete-file.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-delete-file.md rename to src/06-gbdialog/keyword-delete-file.md diff --git a/src/chapter-06-gbdialog/keyword-delete-http.md b/src/06-gbdialog/keyword-delete-http.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-delete-http.md rename to src/06-gbdialog/keyword-delete-http.md diff --git a/src/chapter-06-gbdialog/keyword-delete.md b/src/06-gbdialog/keyword-delete.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-delete.md rename to src/06-gbdialog/keyword-delete.md diff --git a/src/chapter-06-gbdialog/keyword-download.md b/src/06-gbdialog/keyword-download.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-download.md rename to src/06-gbdialog/keyword-download.md diff --git a/src/chapter-06-gbdialog/keyword-exit-for.md b/src/06-gbdialog/keyword-exit-for.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-exit-for.md rename to src/06-gbdialog/keyword-exit-for.md diff --git a/src/chapter-06-gbdialog/keyword-extract.md b/src/06-gbdialog/keyword-extract.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-extract.md rename to src/06-gbdialog/keyword-extract.md diff --git a/src/chapter-06-gbdialog/keyword-fill.md b/src/06-gbdialog/keyword-fill.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-fill.md rename to src/06-gbdialog/keyword-fill.md diff --git a/src/chapter-06-gbdialog/keyword-filter.md b/src/06-gbdialog/keyword-filter.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-filter.md rename to src/06-gbdialog/keyword-filter.md diff --git a/src/chapter-06-gbdialog/keyword-find.md b/src/06-gbdialog/keyword-find.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-find.md rename to src/06-gbdialog/keyword-find.md diff --git a/src/chapter-06-gbdialog/keyword-first.md b/src/06-gbdialog/keyword-first.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-first.md rename to src/06-gbdialog/keyword-first.md diff --git a/src/chapter-06-gbdialog/keyword-for-each.md b/src/06-gbdialog/keyword-for-each.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-for-each.md rename to src/06-gbdialog/keyword-for-each.md diff --git a/src/chapter-06-gbdialog/keyword-format.md b/src/06-gbdialog/keyword-format.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-format.md rename to src/06-gbdialog/keyword-format.md diff --git a/src/chapter-06-gbdialog/keyword-generate-pdf.md b/src/06-gbdialog/keyword-generate-pdf.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-generate-pdf.md rename to src/06-gbdialog/keyword-generate-pdf.md diff --git a/src/chapter-06-gbdialog/keyword-get-bot-memory.md b/src/06-gbdialog/keyword-get-bot-memory.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-get-bot-memory.md rename to src/06-gbdialog/keyword-get-bot-memory.md diff --git a/src/chapter-06-gbdialog/keyword-get-user-memory.md b/src/06-gbdialog/keyword-get-user-memory.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-get-user-memory.md rename to src/06-gbdialog/keyword-get-user-memory.md diff --git a/src/chapter-06-gbdialog/keyword-get.md b/src/06-gbdialog/keyword-get.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-get.md rename to src/06-gbdialog/keyword-get.md diff --git a/src/chapter-06-gbdialog/keyword-graphql.md b/src/06-gbdialog/keyword-graphql.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-graphql.md rename to src/06-gbdialog/keyword-graphql.md diff --git a/src/chapter-06-gbdialog/keyword-group-by.md b/src/06-gbdialog/keyword-group-by.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-group-by.md rename to src/06-gbdialog/keyword-group-by.md diff --git a/src/chapter-06-gbdialog/keyword-hear.md b/src/06-gbdialog/keyword-hear.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-hear.md rename to src/06-gbdialog/keyword-hear.md diff --git a/src/chapter-06-gbdialog/keyword-insert.md b/src/06-gbdialog/keyword-insert.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-insert.md rename to src/06-gbdialog/keyword-insert.md diff --git a/src/chapter-06-gbdialog/keyword-instr.md b/src/06-gbdialog/keyword-instr.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-instr.md rename to src/06-gbdialog/keyword-instr.md diff --git a/src/chapter-06-gbdialog/keyword-is-numeric.md b/src/06-gbdialog/keyword-is-numeric.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-is-numeric.md rename to src/06-gbdialog/keyword-is-numeric.md diff --git a/src/chapter-06-gbdialog/keyword-join.md b/src/06-gbdialog/keyword-join.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-join.md rename to src/06-gbdialog/keyword-join.md diff --git a/src/chapter-06-gbdialog/keyword-kb-collection-stats.md b/src/06-gbdialog/keyword-kb-collection-stats.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-kb-collection-stats.md rename to src/06-gbdialog/keyword-kb-collection-stats.md diff --git a/src/chapter-06-gbdialog/keyword-kb-documents-added-since.md b/src/06-gbdialog/keyword-kb-documents-added-since.md similarity index 97% rename from src/chapter-06-gbdialog/keyword-kb-documents-added-since.md rename to src/06-gbdialog/keyword-kb-documents-added-since.md index 5228df99..577fc99a 100644 --- a/src/chapter-06-gbdialog/keyword-kb-documents-added-since.md +++ b/src/06-gbdialog/keyword-kb-documents-added-since.md @@ -88,7 +88,7 @@ END IF recent_docs = KB DOCUMENTS ADDED SINCE 3 IF recent_docs = 0 THEN - SEND_MAIL admin_email, + SEND MAIL admin_email, "KB Activity Alert", "No documents have been added to the knowledge base in the last 3 days. Please check content pipelines.", [] @@ -111,7 +111,7 @@ report = report + "Last 30 days: " + day_30 + " documents\n" report = report + "\nDaily average (30 days): " + FORMAT(day_30 / 30, "#,##0.0") + "\n" report = report + "Weekly average (30 days): " + FORMAT(day_30 / 4, "#,##0.0") -SEND_MAIL admin_email, "Weekly KB Ingestion Report", report, [] +SEND MAIL admin_email, "Weekly KB Ingestion Report", report, [] ``` ### Pipeline Monitoring diff --git a/src/chapter-06-gbdialog/keyword-kb-documents-count.md b/src/06-gbdialog/keyword-kb-documents-count.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-kb-documents-count.md rename to src/06-gbdialog/keyword-kb-documents-count.md diff --git a/src/chapter-06-gbdialog/keyword-kb-list-collections.md b/src/06-gbdialog/keyword-kb-list-collections.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-kb-list-collections.md rename to src/06-gbdialog/keyword-kb-list-collections.md diff --git a/src/chapter-06-gbdialog/keyword-kb-statistics.md b/src/06-gbdialog/keyword-kb-statistics.md similarity index 98% rename from src/chapter-06-gbdialog/keyword-kb-statistics.md rename to src/06-gbdialog/keyword-kb-statistics.md index e621377b..e30594ac 100644 --- a/src/chapter-06-gbdialog/keyword-kb-statistics.md +++ b/src/06-gbdialog/keyword-kb-statistics.md @@ -121,13 +121,13 @@ storage_threshold_mb = 1000 ' 1 GB warning threshold critical_threshold_mb = 5000 ' 5 GB critical threshold IF stats.total_disk_size_mb > critical_threshold_mb THEN - SEND_MAIL admin_email, + SEND MAIL admin_email, "CRITICAL: KB Storage Alert", "Knowledge base storage is at " + FORMAT(stats.total_disk_size_mb, "#,##0") + " MB. Immediate action required.", [] TALK "Critical storage alert sent to administrator" ELSE IF stats.total_disk_size_mb > storage_threshold_mb THEN - SEND_MAIL admin_email, + SEND MAIL admin_email, "Warning: KB Storage Growing", "Knowledge base storage is at " + FORMAT(stats.total_disk_size_mb, "#,##0") + " MB. Consider cleanup.", [] @@ -183,7 +183,7 @@ FOR EACH coll IN stats.collections body = body + " - " + coll.name + ": " + FORMAT(coll.points_count, "#,##0") + " docs\n" END FOR -SEND_MAIL admin_email, "Weekly KB Report - " + FORMAT(NOW(), "YYYY-MM-DD"), body, [] +SEND MAIL admin_email, "Weekly KB Report - " + FORMAT(NOW(), "YYYY-MM-DD"), body, [] ``` ### Usage Analytics Integration diff --git a/src/chapter-06-gbdialog/keyword-kb-storage-size.md b/src/06-gbdialog/keyword-kb-storage-size.md similarity index 99% rename from src/chapter-06-gbdialog/keyword-kb-storage-size.md rename to src/06-gbdialog/keyword-kb-storage-size.md index 579e3a3b..7e43cd73 100644 --- a/src/chapter-06-gbdialog/keyword-kb-storage-size.md +++ b/src/06-gbdialog/keyword-kb-storage-size.md @@ -56,7 +56,7 @@ storage_mb = KB STORAGE SIZE max_storage_mb = 1000 ' 1 GB limit IF storage_mb > max_storage_mb THEN - SEND_MAIL admin_email, + SEND MAIL admin_email, "KB Storage Alert", "Knowledge base storage (" + FORMAT(storage_mb, "#,##0") + " MB) has exceeded the " + max_storage_mb + " MB threshold.", [] diff --git a/src/chapter-06-gbdialog/keyword-last.md b/src/06-gbdialog/keyword-last.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-last.md rename to src/06-gbdialog/keyword-last.md diff --git a/src/chapter-06-gbdialog/keyword-list.md b/src/06-gbdialog/keyword-list.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-list.md rename to src/06-gbdialog/keyword-list.md diff --git a/src/chapter-06-gbdialog/keyword-map.md b/src/06-gbdialog/keyword-map.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-map.md rename to src/06-gbdialog/keyword-map.md diff --git a/src/chapter-06-gbdialog/keyword-merge-pdf.md b/src/06-gbdialog/keyword-merge-pdf.md similarity index 99% rename from src/chapter-06-gbdialog/keyword-merge-pdf.md rename to src/06-gbdialog/keyword-merge-pdf.md index 53df64c6..caacad5a 100644 --- a/src/chapter-06-gbdialog/keyword-merge-pdf.md +++ b/src/06-gbdialog/keyword-merge-pdf.md @@ -295,7 +295,7 @@ sections = [ "06-appendices.pdf" ] -result = MERGE_PDF sections, "final-report.pdf" +result = MERGE PDF sections, "final-report.pdf" ``` ### Temporary File Cleanup diff --git a/src/chapter-06-gbdialog/keyword-merge.md b/src/06-gbdialog/keyword-merge.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-merge.md rename to src/06-gbdialog/keyword-merge.md diff --git a/src/chapter-06-gbdialog/keyword-model-route.md b/src/06-gbdialog/keyword-model-route.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-model-route.md rename to src/06-gbdialog/keyword-model-route.md diff --git a/src/chapter-06-gbdialog/keyword-move.md b/src/06-gbdialog/keyword-move.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-move.md rename to src/06-gbdialog/keyword-move.md diff --git a/src/06-gbdialog/keyword-on-error.md b/src/06-gbdialog/keyword-on-error.md new file mode 100644 index 00000000..0cb9ea92 --- /dev/null +++ b/src/06-gbdialog/keyword-on-error.md @@ -0,0 +1,476 @@ +# ON ERROR RESUME NEXT + +The `ON ERROR RESUME NEXT` keyword enables BASIC error handling, allowing scripts to continue execution when errors occur instead of terminating immediately. + +--- + +## Syntax + +```basic +ON ERROR RESUME NEXT ' Enable error trapping +ON ERROR GOTO 0 ' Disable error trapping +``` + +--- + +## Description + +`ON ERROR RESUME NEXT` enables error trapping mode where execution continues to the next statement after an error occurs, rather than halting the script. This pattern is borrowed from BASIC and provides a simple way to handle errors gracefully in BASIC scripts. + +When error trapping is enabled: +- Errors are captured but don't stop execution +- The `ERROR` function returns `TRUE` if an error occurred +- The `ERROR MESSAGE` function returns the error description +- The `ERR` variable contains the error number + +Use `ON ERROR GOTO 0` to disable error trapping and restore normal error behavior. + +--- + +## Error State Keywords + +| Keyword | Description | Example | +|---------|-------------|---------| +| `ON ERROR RESUME NEXT` | Enable error trapping | `ON ERROR RESUME NEXT` | +| `ON ERROR GOTO 0` | Disable error trapping | `ON ERROR GOTO 0` | +| `ERROR` | Returns TRUE if error occurred | `IF ERROR THEN` | +| `ERROR MESSAGE` | Get last error message | `msg = ERROR MESSAGE` | +| `ERR` | Get error number | `code = ERR` | +| `CLEAR ERROR` | Clear error state | `CLEAR ERROR` | +| `THROW` | Raise a custom error | `THROW "Invalid input"` | +| `ASSERT` | Assert a condition | `ASSERT count > 0, "Count must be positive"` | + +--- + +## Examples + +### Basic Error Handling + +```basic +' Enable error trapping +ON ERROR RESUME NEXT + +' Attempt a risky operation +result = GET "https://api.example.com/data" + +' Check if it failed +IF ERROR THEN + TALK "Sorry, I couldn't fetch the data: " + ERROR MESSAGE +ELSE + TALK "Data retrieved successfully!" +END IF +``` + +### Multiple Operations with Error Checking + +```basic +ON ERROR RESUME NEXT + +' Try to read a file +content = READ "config.csv" +IF ERROR THEN + TALK "Config file not found, using defaults" + CLEAR ERROR + content = "name,value\ndefault,true" +END IF + +' Try to parse it +data = PARSE_CSV(content) +IF ERROR THEN + TALK "Failed to parse config: " + ERROR MESSAGE + CLEAR ERROR +END IF + +' Continue with whatever data we have +TALK "Loaded " + LEN(data) + " configuration entries" +``` + +### Database Operations + +```basic +ON ERROR RESUME NEXT + +' Try to insert a record +INSERT "customers", #{ + "name": customer_name, + "email": customer_email, + "created_at": NOW() +} + +IF ERROR THEN + IF INSTR(ERROR MESSAGE, "duplicate") > 0 THEN + TALK "This customer already exists in our system." + ELSE IF INSTR(ERROR MESSAGE, "connection") > 0 THEN + TALK "Database is temporarily unavailable. Please try again." + ELSE + TALK "Could not save customer: " + ERROR MESSAGE + END IF +ELSE + TALK "Customer saved successfully!" +END IF + +ON ERROR GOTO 0 ' Disable error trapping +``` + +### HTTP Request with Fallback + +```basic +ON ERROR RESUME NEXT + +' Try primary API +data = GET "https://primary-api.example.com/endpoint" + +IF ERROR THEN + PRINT "Primary API failed: " + ERROR MESSAGE + CLEAR ERROR + + ' Try fallback API + data = GET "https://fallback-api.example.com/endpoint" + + IF ERROR THEN + TALK "Both APIs are unavailable. Please try again later." + RETURN + END IF +END IF + +' Process the data +TALK "Retrieved: " + data.name +``` + +### File Operations with Cleanup + +```basic +ON ERROR RESUME NEXT + +' Generate a report +report = GENERATE PDF "templates/report.html", report_data, "temp/report.pdf" + +IF ERROR THEN + TALK "Failed to generate report: " + ERROR MESSAGE + CLEAR ERROR +ELSE + ' Try to send it + SEND MAIL recipient, "Your Report", "Please find your report attached.", [report.localName] + + IF ERROR THEN + TALK "Report generated but email failed: " + ERROR MESSAGE + DOWNLOAD report.url AS "report.pdf" + TALK "You can download it directly instead." + ELSE + TALK "Report sent successfully!" + END IF + + ' Clean up temp file + DELETE "temp/report.pdf" + ' Ignore cleanup errors + CLEAR ERROR +END IF + +ON ERROR GOTO 0 +``` + +### Validation with ASSERT + +```basic +ON ERROR RESUME NEXT + +' Validate input +ASSERT LEN(email) > 0, "Email is required" +IF ERROR THEN + TALK ERROR MESSAGE + RETURN +END IF + +ASSERT INSTR(email, "@") > 0, "Invalid email format" +IF ERROR THEN + TALK ERROR MESSAGE + RETURN +END IF + +ASSERT amount > 0, "Amount must be positive" +IF ERROR THEN + TALK ERROR MESSAGE + RETURN +END IF + +' All validations passed +TALK "Processing your request..." +``` + +### Custom Error with THROW + +```basic +ON ERROR RESUME NEXT + +' Check business rules +IF quantity > inventory_count THEN + THROW "Insufficient inventory: only " + inventory_count + " items available" +END IF + +IF customer_credit < total_price THEN + THROW "Insufficient credit: need $" + FORMAT(total_price - customer_credit, "#,##0.00") + " more" +END IF + +' Check for errors from THROW +IF ERROR THEN + TALK "Cannot process order: " + ERROR MESSAGE + RETURN +END IF + +' Continue with order processing +TALK "Order confirmed!" +``` + +### Loop with Error Recovery + +```basic +ON ERROR RESUME NEXT + +successful = 0 +failed = 0 + +FOR EACH item IN items_to_process + ' Process each item + result = POST "https://api.example.com/process", item + + IF ERROR THEN + PRINT "Failed to process item " + item.id + ": " + ERROR MESSAGE + failed = failed + 1 + CLEAR ERROR ' Clear error to continue loop + ELSE + successful = successful + 1 + END IF +NEXT + +ON ERROR GOTO 0 + +TALK "Processing complete: " + successful + " succeeded, " + failed + " failed" +``` + +### Nested Error Handling + +```basic +ON ERROR RESUME NEXT + +' Outer operation +connection = CONNECT "database" + +IF ERROR THEN + TALK "Database connection failed" + RETURN +END IF + +' Inner operation +ON ERROR RESUME NEXT +result = QUERY connection, "SELECT * FROM users" + +IF ERROR THEN + TALK "Query failed, trying alternative..." + CLEAR ERROR + result = QUERY connection, "SELECT * FROM users_backup" +END IF + +IF ERROR THEN + TALK "All queries failed: " + ERROR MESSAGE +ELSE + TALK "Found " + LEN(result) + " users" +END IF + +ON ERROR GOTO 0 +``` + +--- + +## Error Codes + +Common error codes returned by `ERR`: + +| Code | Category | Description | +|------|----------|-------------| +| 1xxx | Network | HTTP and connection errors | +| 2xxx | Database | SQL and data errors | +| 3xxx | File | File system errors | +| 4xxx | Validation | Input validation errors | +| 5xxx | Auth | Authentication/authorization errors | +| 9xxx | System | Internal system errors | + +### Checking Error Codes + +```basic +ON ERROR RESUME NEXT + +result = GET url + +IF ERROR THEN + SELECT CASE ERR + CASE 1001 + TALK "Network timeout - please try again" + CASE 1002 + TALK "Server not found" + CASE 1003 + TALK "Connection refused" + CASE 1404 + TALK "Resource not found" + CASE 1500 + TALK "Server error - please try later" + CASE ELSE + TALK "Error " + ERR + ": " + ERROR MESSAGE + END SELECT +END IF +``` + +--- + +## Best Practices + +### Always Clear Errors When Continuing + +```basic +ON ERROR RESUME NEXT + +result = RISKY_OPERATION() +IF ERROR THEN + ' Handle the error + TALK "Operation failed" + CLEAR ERROR ' Clear before next operation +END IF + +' Next operation won't see stale error +result2 = ANOTHER_OPERATION() +``` + +### Disable Error Trapping When Done + +```basic +ON ERROR RESUME NEXT + +' Protected code section +result = RISKY_OPERATION() +IF ERROR THEN + TALK "Handled error: " + ERROR MESSAGE +END IF + +ON ERROR GOTO 0 ' Re-enable normal error behavior + +' Errors here will halt execution as normal +``` + +### Log Errors for Debugging + +```basic +ON ERROR RESUME NEXT + +result = COMPLEX_OPERATION() + +IF ERROR THEN + ' Log full details for debugging + PRINT "ERROR at " + FORMAT(NOW(), "YYYY-MM-DD HH:mm:ss") + PRINT " Code: " + ERR + PRINT " Message: " + ERROR MESSAGE + PRINT " Context: processing " + current_item.id + + ' User-friendly message + TALK "Something went wrong. Our team has been notified." + CLEAR ERROR +END IF +``` + +### Don't Ignore Errors Silently + +```basic +' BAD - Errors are silently ignored +ON ERROR RESUME NEXT +data = GET url +TALK "Got data: " + data ' May fail if GET failed + +' GOOD - Check and handle errors +ON ERROR RESUME NEXT +data = GET url +IF ERROR THEN + TALK "Could not fetch data" + data = DEFAULT_DATA +END IF +TALK "Got data: " + data +``` + +### Use Specific Error Checks + +```basic +ON ERROR RESUME NEXT + +result = DATABASE_OPERATION() + +IF ERROR THEN + error_msg = ERROR MESSAGE + + ' Handle specific errors differently + IF INSTR(error_msg, "timeout") > 0 THEN + WAIT 2 + result = DATABASE_OPERATION() ' Retry + ELSE IF INSTR(error_msg, "duplicate") > 0 THEN + TALK "This record already exists" + ELSE IF INSTR(error_msg, "permission") > 0 THEN + TALK "You don't have permission for this action" + ELSE + TALK "Database error: " + error_msg + END IF +END IF +``` + +--- + +## Comparison with TRY...CATCH + +For more complex error handling, you can use structured `TRY...CATCH` blocks: + +```basic +' ON ERROR style (simpler) +ON ERROR RESUME NEXT +result = RISKY() +IF ERROR THEN + TALK "Error: " + ERROR MESSAGE +END IF +ON ERROR GOTO 0 + +' TRY...CATCH style (more structured) +TRY + result = RISKY() +CATCH e + TALK "Error: " + e.message +END TRY +``` + +Use `ON ERROR RESUME NEXT` for: +- Simple scripts with few error points +- Quick prototyping +- BASIC-familiar developers + +Use `TRY...CATCH` for: +- Complex error handling logic +- Multiple specific catch blocks needed +- Modern structured programming style + +--- + +## Implementation Notes + +- Implemented in Rust under `src/basic/keywords/errors/on_error.rs` +- Error state is thread-local per script execution +- Error trapping scope is global to the script (not block-scoped) +- `CLEAR ERROR` resets both `ERROR` flag and `ERROR MESSAGE` +- Maximum error message length: 4096 characters + +--- + +## Related Keywords + +- [THROW](keyword-throw.md) β€” Raise custom errors +- [ASSERT](keyword-assert.md) β€” Assert conditions +- [PRINT](keyword-print.md) β€” Debug output for error logging +- [WAIT](keyword-wait.md) β€” Delay before retry + +--- + +## Summary + +`ON ERROR RESUME NEXT` provides BASIC error handling for BASIC scripts, allowing graceful handling of errors without script termination. Always check `ERROR` after risky operations, use `CLEAR ERROR` before subsequent operations, and disable error trapping with `ON ERROR GOTO 0` when protection is no longer needed. For user-facing errors, provide clear messages while logging technical details for debugging. \ No newline at end of file diff --git a/src/chapter-06-gbdialog/keyword-on.md b/src/06-gbdialog/keyword-on.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-on.md rename to src/06-gbdialog/keyword-on.md diff --git a/src/chapter-06-gbdialog/keyword-patch.md b/src/06-gbdialog/keyword-patch.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-patch.md rename to src/06-gbdialog/keyword-patch.md diff --git a/src/chapter-06-gbdialog/keyword-pivot.md b/src/06-gbdialog/keyword-pivot.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-pivot.md rename to src/06-gbdialog/keyword-pivot.md diff --git a/src/chapter-06-gbdialog/keyword-play.md b/src/06-gbdialog/keyword-play.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-play.md rename to src/06-gbdialog/keyword-play.md diff --git a/src/chapter-06-gbdialog/keyword-post.md b/src/06-gbdialog/keyword-post.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-post.md rename to src/06-gbdialog/keyword-post.md diff --git a/src/chapter-06-gbdialog/keyword-print.md b/src/06-gbdialog/keyword-print.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-print.md rename to src/06-gbdialog/keyword-print.md diff --git a/src/chapter-06-gbdialog/keyword-put.md b/src/06-gbdialog/keyword-put.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-put.md rename to src/06-gbdialog/keyword-put.md diff --git a/src/chapter-06-gbdialog/keyword-qrcode.md b/src/06-gbdialog/keyword-qrcode.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-qrcode.md rename to src/06-gbdialog/keyword-qrcode.md diff --git a/src/chapter-06-gbdialog/keyword-read.md b/src/06-gbdialog/keyword-read.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-read.md rename to src/06-gbdialog/keyword-read.md diff --git a/src/chapter-06-gbdialog/keyword-reference-complete.md b/src/06-gbdialog/keyword-reference-complete.md similarity index 94% rename from src/chapter-06-gbdialog/keyword-reference-complete.md rename to src/06-gbdialog/keyword-reference-complete.md index 3a0f289e..9b90dd43 100644 --- a/src/chapter-06-gbdialog/keyword-reference-complete.md +++ b/src/06-gbdialog/keyword-reference-complete.md @@ -88,6 +88,14 @@ This document provides a comprehensive reference of all BASIC keywords in Genera | `WEATHER` | βœ… Implemented | Special | Get weather | | `INSTR` | βœ… Implemented | String | Find substring | | `IS NUMERIC` | βœ… Implemented | Validation | Check if numeric | +| `ON ERROR RESUME NEXT` | βœ… Implemented | Errors | Enable error trapping | +| `ON ERROR GOTO 0` | βœ… Implemented | Errors | Disable error trapping | +| `ERROR` | βœ… Implemented | Errors | Check if error occurred | +| `ERROR MESSAGE` | βœ… Implemented | Errors | Get error message | +| `ERR` | βœ… Implemented | Errors | Get error number | +| `CLEAR ERROR` | βœ… Implemented | Errors | Clear error state | +| `THROW` | βœ… Implemented | Errors | Raise custom error | +| `ASSERT` | βœ… Implemented | Errors | Assert condition | --- @@ -183,15 +191,19 @@ This document provides a comprehensive reference of all BASIC keywords in Genera | `POP` | `value = POP(array)` | Remove from end | ⭐⭐ | | `REVERSE` | `reversed = REVERSE(array)` | Reverse array | ⭐ | -### Error Handling (Critical) +### Error Handling -| Keyword | Syntax | Description | Priority | -|---------|--------|-------------|----------| -| `ON ERROR GOTO` | `ON ERROR GOTO handler` | Set error handler | ⭐⭐⭐ | -| `ON ERROR RESUME NEXT` | `ON ERROR RESUME NEXT` | Ignore errors | ⭐⭐ | -| `TRY...CATCH...END TRY` | `TRY ... CATCH e ... END TRY` | Structured errors | ⭐⭐⭐ | -| `THROW` | `THROW "error message"` | Raise error | ⭐⭐ | -| `ERR` | `code = ERR.NUMBER` | Get error code | ⭐⭐ | +| Keyword | Syntax | Description | Status | +|---------|--------|-------------|--------| +| `ON ERROR RESUME NEXT` | `ON ERROR RESUME NEXT` | Enable error trapping | βœ… Implemented | +| `ON ERROR GOTO 0` | `ON ERROR GOTO 0` | Disable error trapping | βœ… Implemented | +| `ERROR` | `IF ERROR THEN` | Check if error occurred | βœ… Implemented | +| `ERROR MESSAGE` | `msg = ERROR MESSAGE` | Get error message | βœ… Implemented | +| `ERR` | `code = ERR` | Get error number | βœ… Implemented | +| `CLEAR ERROR` | `CLEAR ERROR` | Clear error state | βœ… Implemented | +| `THROW` | `THROW "error message"` | Raise custom error | βœ… Implemented | +| `ASSERT` | `ASSERT cond, "msg"` | Assert condition | βœ… Implemented | +| `TRY...CATCH...END TRY` | `TRY ... CATCH e ... END TRY` | Structured errors | πŸ”œ Planned | ### Social Media (New) diff --git a/src/chapter-06-gbdialog/keyword-remember.md b/src/06-gbdialog/keyword-remember.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-remember.md rename to src/06-gbdialog/keyword-remember.md diff --git a/src/chapter-06-gbdialog/keyword-run-code.md b/src/06-gbdialog/keyword-run-code.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-run-code.md rename to src/06-gbdialog/keyword-run-code.md diff --git a/src/chapter-06-gbdialog/keyword-save.md b/src/06-gbdialog/keyword-save.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-save.md rename to src/06-gbdialog/keyword-save.md diff --git a/src/chapter-06-gbdialog/keyword-send-mail.md b/src/06-gbdialog/keyword-send-mail.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-send-mail.md rename to src/06-gbdialog/keyword-send-mail.md diff --git a/src/chapter-06-gbdialog/keyword-send-template.md b/src/06-gbdialog/keyword-send-template.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-send-template.md rename to src/06-gbdialog/keyword-send-template.md diff --git a/src/chapter-06-gbdialog/keyword-set-bot-memory.md b/src/06-gbdialog/keyword-set-bot-memory.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-set-bot-memory.md rename to src/06-gbdialog/keyword-set-bot-memory.md diff --git a/src/chapter-06-gbdialog/keyword-set-context.md b/src/06-gbdialog/keyword-set-context.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-set-context.md rename to src/06-gbdialog/keyword-set-context.md diff --git a/src/chapter-06-gbdialog/keyword-set-header.md b/src/06-gbdialog/keyword-set-header.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-set-header.md rename to src/06-gbdialog/keyword-set-header.md diff --git a/src/chapter-06-gbdialog/keyword-set-schedule.md b/src/06-gbdialog/keyword-set-schedule.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-set-schedule.md rename to src/06-gbdialog/keyword-set-schedule.md diff --git a/src/chapter-06-gbdialog/keyword-set-user-memory.md b/src/06-gbdialog/keyword-set-user-memory.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-set-user-memory.md rename to src/06-gbdialog/keyword-set-user-memory.md diff --git a/src/chapter-06-gbdialog/keyword-set-user.md b/src/06-gbdialog/keyword-set-user.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-set-user.md rename to src/06-gbdialog/keyword-set-user.md diff --git a/src/chapter-06-gbdialog/keyword-set.md b/src/06-gbdialog/keyword-set.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-set.md rename to src/06-gbdialog/keyword-set.md diff --git a/src/chapter-06-gbdialog/keyword-sms.md b/src/06-gbdialog/keyword-sms.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-sms.md rename to src/06-gbdialog/keyword-sms.md diff --git a/src/chapter-06-gbdialog/keyword-soap.md b/src/06-gbdialog/keyword-soap.md similarity index 64% rename from src/chapter-06-gbdialog/keyword-soap.md rename to src/06-gbdialog/keyword-soap.md index 84329338..b52462de 100644 --- a/src/chapter-06-gbdialog/keyword-soap.md +++ b/src/06-gbdialog/keyword-soap.md @@ -257,27 +257,240 @@ END IF ## Authentication -### WS-Security (Username Token) +SOAP services commonly use several authentication methods. General Bots supports all major approaches. + +### Basic Authentication + +The simplest form of authentication, sending username and password with each request: ```basic -' For services requiring WS-Security authentication -' Set credentials via SET HEADER before SOAP call +' Basic HTTP authentication SET HEADER "Authorization", "Basic " + BASE64(username + ":" + password) result = SOAP service_url, operation, params + +CLEAR HEADERS ``` -### Certificate-Based Authentication +### WS-Security (Username Token) -For services requiring client certificates, configure at the system level in `config.csv`: +WS-Security adds security tokens directly to the SOAP envelope. Configure in `config.csv`: + +```csv +name,value +soap-wsse-enabled,true +soap-wsse-username,your_username +soap-wsse-password,your_password +soap-wsse-password-type,PasswordDigest +``` + +**Password Types:** +- `PasswordText` - Password sent in plain text (use only with HTTPS) +- `PasswordDigest` - Password hashed with nonce and timestamp (recommended) + +**Usage:** + +```basic +' WS-Security is applied automatically when configured +result = SOAP "https://secure.service.com/api?wsdl", "SecureOperation", params + +' The SOAP envelope will include: +' +' +' your_username +' hashed_password +' ... +' ... +' +' +``` + +### WS-Security with Timestamp + +Add timestamp validation to prevent replay attacks: + +```csv +name,value +soap-wsse-enabled,true +soap-wsse-username,your_username +soap-wsse-password,your_password +soap-wsse-timestamp,true +soap-wsse-timestamp-ttl,300 +``` + +The `timestamp-ttl` sets validity in seconds (default: 300 = 5 minutes). + +### Certificate-Based Authentication (Mutual TLS) + +For services requiring client certificates: ```csv name,value soap-client-cert,/path/to/client.pem soap-client-key,/path/to/client.key +soap-client-key-password,optional_key_password soap-ca-cert,/path/to/ca.pem +soap-verify-ssl,true ``` +**Certificate Formats Supported:** +- PEM (`.pem`, `.crt`, `.cer`) +- PKCS#12 (`.p12`, `.pfx`) - set `soap-client-cert-type,p12` + +**Example for Brazilian NFe:** + +```csv +name,value +soap-client-cert,/certs/certificado_a1.pfx +soap-client-cert-type,p12 +soap-client-key-password,cert_password +soap-ca-cert,/certs/cadeia_nfe.pem +``` + +### OAuth 2.0 Authentication + +For modern SOAP services that support OAuth: + +```csv +name,value +soap-oauth-enabled,true +soap-oauth-token-url,https://auth.service.com/oauth/token +soap-oauth-client-id,your_client_id +soap-oauth-client-secret,your_client_secret +soap-oauth-scope,soap_api +``` + +**Or provide token directly:** + +```basic +' Get OAuth token first +token_response = POST "https://auth.service.com/oauth/token", #{ + "grant_type": "client_credentials", + "client_id": client_id, + "client_secret": client_secret +} + +' Use token for SOAP call +SET HEADER "Authorization", "Bearer " + token_response.access_token + +result = SOAP service_url, operation, params + +CLEAR HEADERS +``` + +### API Key Authentication + +Some SOAP services use API keys: + +```basic +' API key in header +SET HEADER "X-API-Key", api_key + +result = SOAP service_url, operation, params + +CLEAR HEADERS +``` + +**Or configure in config.csv:** + +```csv +name,value +soap-api-key,your_api_key +soap-api-key-header,X-API-Key +``` + +### SAML Token Authentication + +For enterprise SSO with SAML: + +```csv +name,value +soap-saml-enabled,true +soap-saml-assertion-url,https://idp.company.com/saml/assertion +soap-saml-issuer,https://your-bot.example.com +``` + +### Custom SOAP Headers + +For services requiring custom security headers: + +```basic +' Add custom SOAP header +SET HEADER "SOAPAction", "urn:processPayment" +SET HEADER "X-Custom-Auth", custom_auth_value + +result = SOAP service_url, operation, params + +CLEAR HEADERS +``` + +### Authentication Examples by Industry + +#### Government/Fiscal Services (NFe, NFS-e) + +```csv +name,value +soap-client-cert,/certs/e-cnpj-a1.pfx +soap-client-cert-type,p12 +soap-client-key-password,certificate_password +soap-ca-cert,/certs/ac-raiz.pem +soap-wsse-enabled,false +``` + +#### Banking/Financial Services + +```csv +name,value +soap-wsse-enabled,true +soap-wsse-username,bank_user +soap-wsse-password,bank_password +soap-wsse-password-type,PasswordDigest +soap-wsse-timestamp,true +soap-client-cert,/certs/bank-client.pem +soap-client-key,/certs/bank-client.key +``` + +#### Healthcare (HL7/SOAP) + +```csv +name,value +soap-wsse-enabled,true +soap-wsse-username,hl7_system_user +soap-wsse-password,hl7_system_password +soap-timeout,60 +``` + +#### Legacy ERP (SAP, Oracle) + +```csv +name,value +soap-auth-type,basic +soap-username,erp_integration_user +soap-password,erp_integration_password +soap-timeout,120 +``` + +### Configuration Reference + +| Parameter | Description | Default | +|-----------|-------------|---------| +| `soap-timeout` | Request timeout in seconds | `120` | +| `soap-verify-ssl` | Verify SSL certificates | `true` | +| `soap-wsse-enabled` | Enable WS-Security | `false` | +| `soap-wsse-username` | WS-Security username | Not set | +| `soap-wsse-password` | WS-Security password | Not set | +| `soap-wsse-password-type` | `PasswordText` or `PasswordDigest` | `PasswordDigest` | +| `soap-wsse-timestamp` | Include timestamp | `false` | +| `soap-wsse-timestamp-ttl` | Timestamp validity (seconds) | `300` | +| `soap-client-cert` | Path to client certificate | Not set | +| `soap-client-key` | Path to client private key | Not set | +| `soap-client-key-password` | Password for private key | Not set | +| `soap-client-cert-type` | Certificate type (`pem`, `p12`) | `pem` | +| `soap-ca-cert` | Path to CA certificate | Not set | +| `soap-oauth-enabled` | Enable OAuth authentication | `false` | +| `soap-api-key` | API key value | Not set | +| `soap-api-key-header` | Header name for API key | `X-API-Key` | + --- ## Practical Examples diff --git a/src/chapter-06-gbdialog/keyword-start-meet.md b/src/06-gbdialog/keyword-start-meet.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-start-meet.md rename to src/06-gbdialog/keyword-start-meet.md diff --git a/src/chapter-06-gbdialog/keyword-switch.md b/src/06-gbdialog/keyword-switch.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-switch.md rename to src/06-gbdialog/keyword-switch.md diff --git a/src/chapter-06-gbdialog/keyword-synchronize.md b/src/06-gbdialog/keyword-synchronize.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-synchronize.md rename to src/06-gbdialog/keyword-synchronize.md diff --git a/src/chapter-06-gbdialog/keyword-table.md b/src/06-gbdialog/keyword-table.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-table.md rename to src/06-gbdialog/keyword-table.md diff --git a/src/chapter-06-gbdialog/keyword-talk.md b/src/06-gbdialog/keyword-talk.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-talk.md rename to src/06-gbdialog/keyword-talk.md diff --git a/src/chapter-06-gbdialog/keyword-update.md b/src/06-gbdialog/keyword-update.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-update.md rename to src/06-gbdialog/keyword-update.md diff --git a/src/chapter-06-gbdialog/keyword-upload.md b/src/06-gbdialog/keyword-upload.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-upload.md rename to src/06-gbdialog/keyword-upload.md diff --git a/src/chapter-06-gbdialog/keyword-use-kb.md b/src/06-gbdialog/keyword-use-kb.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-use-kb.md rename to src/06-gbdialog/keyword-use-kb.md diff --git a/src/chapter-06-gbdialog/keyword-use-model.md b/src/06-gbdialog/keyword-use-model.md similarity index 98% rename from src/chapter-06-gbdialog/keyword-use-model.md rename to src/06-gbdialog/keyword-use-model.md index f14a3be9..24472ce8 100644 --- a/src/chapter-06-gbdialog/keyword-use-model.md +++ b/src/06-gbdialog/keyword-use-model.md @@ -87,7 +87,7 @@ review = LLM "Review these summaries for accuracy: " + summaries ```basic ' Try preferred model first -USE MODEL "gpt-4" +USE MODEL "claude-sonnet-4.5" ON ERROR GOTO fallback response = LLM prompt GOTO done @@ -129,7 +129,7 @@ name,value model-routing-strategy,auto model-default,fast model-fast,DeepSeek-R3-Distill-Qwen-1.5B-Q3_K_M.gguf -model-quality,gpt-4 +model-quality,claude-sonnet-4.5 model-code,codellama-7b.gguf model-fallback-enabled,true model-fallback-order,quality,fast,local diff --git a/src/chapter-06-gbdialog/keyword-use-tool.md b/src/06-gbdialog/keyword-use-tool.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-use-tool.md rename to src/06-gbdialog/keyword-use-tool.md diff --git a/src/chapter-06-gbdialog/keyword-use-website.md b/src/06-gbdialog/keyword-use-website.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-use-website.md rename to src/06-gbdialog/keyword-use-website.md diff --git a/src/chapter-06-gbdialog/keyword-wait.md b/src/06-gbdialog/keyword-wait.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-wait.md rename to src/06-gbdialog/keyword-wait.md diff --git a/src/chapter-06-gbdialog/keyword-weather.md b/src/06-gbdialog/keyword-weather.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-weather.md rename to src/06-gbdialog/keyword-weather.md diff --git a/src/chapter-06-gbdialog/keyword-webhook.md b/src/06-gbdialog/keyword-webhook.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-webhook.md rename to src/06-gbdialog/keyword-webhook.md diff --git a/src/chapter-06-gbdialog/keyword-write.md b/src/06-gbdialog/keyword-write.md similarity index 100% rename from src/chapter-06-gbdialog/keyword-write.md rename to src/06-gbdialog/keyword-write.md diff --git a/src/chapter-06-gbdialog/keywords-data.md b/src/06-gbdialog/keywords-data.md similarity index 100% rename from src/chapter-06-gbdialog/keywords-data.md rename to src/06-gbdialog/keywords-data.md diff --git a/src/chapter-06-gbdialog/keywords-file.md b/src/06-gbdialog/keywords-file.md similarity index 100% rename from src/chapter-06-gbdialog/keywords-file.md rename to src/06-gbdialog/keywords-file.md diff --git a/src/chapter-06-gbdialog/keywords-http.md b/src/06-gbdialog/keywords-http.md similarity index 100% rename from src/chapter-06-gbdialog/keywords-http.md rename to src/06-gbdialog/keywords-http.md diff --git a/src/chapter-06-gbdialog/keywords-kb-statistics.md b/src/06-gbdialog/keywords-kb-statistics.md similarity index 100% rename from src/chapter-06-gbdialog/keywords-kb-statistics.md rename to src/06-gbdialog/keywords-kb-statistics.md diff --git a/src/chapter-06-gbdialog/keywords-lead-scoring.md b/src/06-gbdialog/keywords-lead-scoring.md similarity index 100% rename from src/chapter-06-gbdialog/keywords-lead-scoring.md rename to src/06-gbdialog/keywords-lead-scoring.md diff --git a/src/chapter-06-gbdialog/keywords-media.md b/src/06-gbdialog/keywords-media.md similarity index 100% rename from src/chapter-06-gbdialog/keywords-media.md rename to src/06-gbdialog/keywords-media.md diff --git a/src/chapter-06-gbdialog/keywords-multi-agent.md b/src/06-gbdialog/keywords-multi-agent.md similarity index 100% rename from src/chapter-06-gbdialog/keywords-multi-agent.md rename to src/06-gbdialog/keywords-multi-agent.md diff --git a/src/chapter-06-gbdialog/keywords-social-media.md b/src/06-gbdialog/keywords-social-media.md similarity index 100% rename from src/chapter-06-gbdialog/keywords-social-media.md rename to src/06-gbdialog/keywords-social-media.md diff --git a/src/chapter-06-gbdialog/keywords.md b/src/06-gbdialog/keywords.md similarity index 100% rename from src/chapter-06-gbdialog/keywords.md rename to src/06-gbdialog/keywords.md diff --git a/src/chapter-06-gbdialog/prompt-blocks.md b/src/06-gbdialog/prompt-blocks.md similarity index 100% rename from src/chapter-06-gbdialog/prompt-blocks.md rename to src/06-gbdialog/prompt-blocks.md diff --git a/src/chapter-06-gbdialog/script-execution-flow.md b/src/06-gbdialog/script-execution-flow.md similarity index 100% rename from src/chapter-06-gbdialog/script-execution-flow.md rename to src/06-gbdialog/script-execution-flow.md diff --git a/src/chapter-06-gbdialog/template-enrollment.md b/src/06-gbdialog/template-enrollment.md similarity index 100% rename from src/chapter-06-gbdialog/template-enrollment.md rename to src/06-gbdialog/template-enrollment.md diff --git a/src/chapter-06-gbdialog/template-start.md b/src/06-gbdialog/template-start.md similarity index 100% rename from src/chapter-06-gbdialog/template-start.md rename to src/06-gbdialog/template-start.md diff --git a/src/chapter-06-gbdialog/template-summary.md b/src/06-gbdialog/template-summary.md similarity index 100% rename from src/chapter-06-gbdialog/template-summary.md rename to src/06-gbdialog/template-summary.md diff --git a/src/chapter-06-gbdialog/template-variables.md b/src/06-gbdialog/template-variables.md similarity index 100% rename from src/chapter-06-gbdialog/template-variables.md rename to src/06-gbdialog/template-variables.md diff --git a/src/chapter-06-gbdialog/templates.md b/src/06-gbdialog/templates.md similarity index 100% rename from src/chapter-06-gbdialog/templates.md rename to src/06-gbdialog/templates.md diff --git a/src/chapter-06-gbdialog/templates/ai-search.md b/src/06-gbdialog/templates/ai-search.md similarity index 100% rename from src/chapter-06-gbdialog/templates/ai-search.md rename to src/06-gbdialog/templates/ai-search.md diff --git a/src/chapter-06-gbdialog/templates/analytics-dashboard.md b/src/06-gbdialog/templates/analytics-dashboard.md similarity index 100% rename from src/chapter-06-gbdialog/templates/analytics-dashboard.md rename to src/06-gbdialog/templates/analytics-dashboard.md diff --git a/src/chapter-06-gbdialog/templates/announcements.md b/src/06-gbdialog/templates/announcements.md similarity index 100% rename from src/chapter-06-gbdialog/templates/announcements.md rename to src/06-gbdialog/templates/announcements.md diff --git a/src/chapter-06-gbdialog/templates/auth.md b/src/06-gbdialog/templates/auth.md similarity index 100% rename from src/chapter-06-gbdialog/templates/auth.md rename to src/06-gbdialog/templates/auth.md diff --git a/src/chapter-06-gbdialog/templates/backup.md b/src/06-gbdialog/templates/backup.md similarity index 100% rename from src/chapter-06-gbdialog/templates/backup.md rename to src/06-gbdialog/templates/backup.md diff --git a/src/chapter-06-gbdialog/templates/bank.md b/src/06-gbdialog/templates/bank.md similarity index 100% rename from src/chapter-06-gbdialog/templates/bank.md rename to src/06-gbdialog/templates/bank.md diff --git a/src/chapter-06-gbdialog/templates/broadcast.md b/src/06-gbdialog/templates/broadcast.md similarity index 100% rename from src/chapter-06-gbdialog/templates/broadcast.md rename to src/06-gbdialog/templates/broadcast.md diff --git a/src/chapter-06-gbdialog/templates/default.md b/src/06-gbdialog/templates/default.md similarity index 100% rename from src/chapter-06-gbdialog/templates/default.md rename to src/06-gbdialog/templates/default.md diff --git a/src/chapter-06-gbdialog/templates/edu.md b/src/06-gbdialog/templates/edu.md similarity index 100% rename from src/chapter-06-gbdialog/templates/edu.md rename to src/06-gbdialog/templates/edu.md diff --git a/src/chapter-06-gbdialog/templates/employees.md b/src/06-gbdialog/templates/employees.md similarity index 100% rename from src/chapter-06-gbdialog/templates/employees.md rename to src/06-gbdialog/templates/employees.md diff --git a/src/chapter-06-gbdialog/templates/enrollment.md b/src/06-gbdialog/templates/enrollment.md similarity index 100% rename from src/chapter-06-gbdialog/templates/enrollment.md rename to src/06-gbdialog/templates/enrollment.md diff --git a/src/chapter-06-gbdialog/templates/erp.md b/src/06-gbdialog/templates/erp.md similarity index 100% rename from src/chapter-06-gbdialog/templates/erp.md rename to src/06-gbdialog/templates/erp.md diff --git a/src/chapter-06-gbdialog/templates/helpdesk.md b/src/06-gbdialog/templates/helpdesk.md similarity index 100% rename from src/chapter-06-gbdialog/templates/helpdesk.md rename to src/06-gbdialog/templates/helpdesk.md diff --git a/src/chapter-06-gbdialog/templates/privacy.md b/src/06-gbdialog/templates/privacy.md similarity index 100% rename from src/chapter-06-gbdialog/templates/privacy.md rename to src/06-gbdialog/templates/privacy.md diff --git a/src/chapter-06-gbdialog/templates/sales-pipeline.md b/src/06-gbdialog/templates/sales-pipeline.md similarity index 100% rename from src/chapter-06-gbdialog/templates/sales-pipeline.md rename to src/06-gbdialog/templates/sales-pipeline.md diff --git a/src/chapter-06-gbdialog/templates/start.md b/src/06-gbdialog/templates/start.md similarity index 100% rename from src/chapter-06-gbdialog/templates/start.md rename to src/06-gbdialog/templates/start.md diff --git a/src/chapter-06-gbdialog/templates/store.md b/src/06-gbdialog/templates/store.md similarity index 100% rename from src/chapter-06-gbdialog/templates/store.md rename to src/06-gbdialog/templates/store.md diff --git a/src/chapter-06-gbdialog/templates/talk-to-data.md b/src/06-gbdialog/templates/talk-to-data.md similarity index 100% rename from src/chapter-06-gbdialog/templates/talk-to-data.md rename to src/06-gbdialog/templates/talk-to-data.md diff --git a/src/chapter-06-gbdialog/templates/whatsapp.md b/src/06-gbdialog/templates/whatsapp.md similarity index 100% rename from src/chapter-06-gbdialog/templates/whatsapp.md rename to src/06-gbdialog/templates/whatsapp.md diff --git a/src/chapter-06-gbdialog/tools-data-sync.md b/src/06-gbdialog/tools-data-sync.md similarity index 100% rename from src/chapter-06-gbdialog/tools-data-sync.md rename to src/06-gbdialog/tools-data-sync.md diff --git a/src/chapter-06-gbdialog/universal-messaging.md b/src/06-gbdialog/universal-messaging.md similarity index 100% rename from src/chapter-06-gbdialog/universal-messaging.md rename to src/06-gbdialog/universal-messaging.md diff --git a/src/chapter-07-gbapp/README.md b/src/07-gbapp/README.md similarity index 100% rename from src/chapter-07-gbapp/README.md rename to src/07-gbapp/README.md diff --git a/src/chapter-07-gbapp/architecture.md b/src/07-gbapp/architecture.md similarity index 100% rename from src/chapter-07-gbapp/architecture.md rename to src/07-gbapp/architecture.md diff --git a/src/chapter-07-gbapp/assets/data-flow.svg.backup b/src/07-gbapp/assets/data-flow.svg.backup similarity index 100% rename from src/chapter-07-gbapp/assets/data-flow.svg.backup rename to src/07-gbapp/assets/data-flow.svg.backup diff --git a/src/chapter-07-gbapp/assets/module-data-flow.svg.backup b/src/07-gbapp/assets/module-data-flow.svg.backup similarity index 100% rename from src/chapter-07-gbapp/assets/module-data-flow.svg.backup rename to src/07-gbapp/assets/module-data-flow.svg.backup diff --git a/src/chapter-07-gbapp/assets/module-dependency.svg.backup b/src/07-gbapp/assets/module-dependency.svg.backup similarity index 100% rename from src/chapter-07-gbapp/assets/module-dependency.svg.backup rename to src/07-gbapp/assets/module-dependency.svg.backup diff --git a/src/chapter-07-gbapp/assets/system-architecture.svg.backup b/src/07-gbapp/assets/system-architecture.svg.backup similarity index 100% rename from src/chapter-07-gbapp/assets/system-architecture.svg.backup rename to src/07-gbapp/assets/system-architecture.svg.backup diff --git a/src/chapter-07-gbapp/building.md b/src/07-gbapp/building.md similarity index 100% rename from src/chapter-07-gbapp/building.md rename to src/07-gbapp/building.md diff --git a/src/chapter-07-gbapp/containers.md b/src/07-gbapp/containers.md similarity index 100% rename from src/chapter-07-gbapp/containers.md rename to src/07-gbapp/containers.md diff --git a/src/chapter-07-gbapp/crates.md b/src/07-gbapp/crates.md similarity index 100% rename from src/chapter-07-gbapp/crates.md rename to src/07-gbapp/crates.md diff --git a/src/chapter-07-gbapp/custom-keywords.md b/src/07-gbapp/custom-keywords.md similarity index 100% rename from src/chapter-07-gbapp/custom-keywords.md rename to src/07-gbapp/custom-keywords.md diff --git a/src/chapter-07-gbapp/dependencies.md b/src/07-gbapp/dependencies.md similarity index 100% rename from src/chapter-07-gbapp/dependencies.md rename to src/07-gbapp/dependencies.md diff --git a/src/chapter-07-gbapp/docker-deployment.md b/src/07-gbapp/docker-deployment.md similarity index 100% rename from src/chapter-07-gbapp/docker-deployment.md rename to src/07-gbapp/docker-deployment.md diff --git a/src/chapter-07-gbapp/example-gbapp.md b/src/07-gbapp/example-gbapp.md similarity index 100% rename from src/chapter-07-gbapp/example-gbapp.md rename to src/07-gbapp/example-gbapp.md diff --git a/src/chapter-07-gbapp/infrastructure.md b/src/07-gbapp/infrastructure.md similarity index 100% rename from src/chapter-07-gbapp/infrastructure.md rename to src/07-gbapp/infrastructure.md diff --git a/src/chapter-07-gbapp/keyword-refactoring.md b/src/07-gbapp/keyword-refactoring.md similarity index 100% rename from src/chapter-07-gbapp/keyword-refactoring.md rename to src/07-gbapp/keyword-refactoring.md diff --git a/src/chapter-07-gbapp/observability.md b/src/07-gbapp/observability.md similarity index 100% rename from src/chapter-07-gbapp/observability.md rename to src/07-gbapp/observability.md diff --git a/src/chapter-07-gbapp/philosophy.md b/src/07-gbapp/philosophy.md similarity index 100% rename from src/chapter-07-gbapp/philosophy.md rename to src/07-gbapp/philosophy.md diff --git a/src/chapter-07-gbapp/scaling.md b/src/07-gbapp/scaling.md similarity index 100% rename from src/chapter-07-gbapp/scaling.md rename to src/07-gbapp/scaling.md diff --git a/src/chapter-07-gbapp/services.md b/src/07-gbapp/services.md similarity index 100% rename from src/chapter-07-gbapp/services.md rename to src/07-gbapp/services.md diff --git a/src/chapter-08-config/README.md b/src/08-config/README.md similarity index 100% rename from src/chapter-08-config/README.md rename to src/08-config/README.md diff --git a/src/chapter-08-config/config-csv.md b/src/08-config/config-csv.md similarity index 100% rename from src/chapter-08-config/config-csv.md rename to src/08-config/config-csv.md diff --git a/src/chapter-08-config/context-config.md b/src/08-config/context-config.md similarity index 100% rename from src/chapter-08-config/context-config.md rename to src/08-config/context-config.md diff --git a/src/chapter-08-config/drive.md b/src/08-config/drive.md similarity index 100% rename from src/chapter-08-config/drive.md rename to src/08-config/drive.md diff --git a/src/chapter-08-config/llm-config.md b/src/08-config/llm-config.md similarity index 98% rename from src/chapter-08-config/llm-config.md rename to src/08-config/llm-config.md index 3059a2fe..c5216758 100644 --- a/src/chapter-08-config/llm-config.md +++ b/src/08-config/llm-config.md @@ -14,7 +14,7 @@ llm-model,../../../../data/llm/DeepSeek-R3-Distill-Qwen-1.5B-Q3_K_M.gguf ### Model Path -The `llm-model` parameter accepts relative paths like `../../../../data/llm/model.gguf`, absolute paths like `/opt/models/model.gguf`, or model names when using external APIs like `gpt-4`. +The `llm-model` parameter accepts relative paths like `../../../../data/llm/model.gguf`, absolute paths like `/opt/models/model.gguf`, or model names when using external APIs like `gpt-5`. ### Supported Model Formats diff --git a/src/chapter-08-config/minio.md b/src/08-config/minio.md similarity index 100% rename from src/chapter-08-config/minio.md rename to src/08-config/minio.md diff --git a/src/chapter-08-config/multimodal.md b/src/08-config/multimodal.md similarity index 100% rename from src/chapter-08-config/multimodal.md rename to src/08-config/multimodal.md diff --git a/src/chapter-08-config/parameters.md b/src/08-config/parameters.md similarity index 85% rename from src/chapter-08-config/parameters.md rename to src/08-config/parameters.md index eb166ce1..6bbce565 100644 --- a/src/chapter-08-config/parameters.md +++ b/src/08-config/parameters.md @@ -222,17 +222,95 @@ These parameters configure external database connections for use with BASIC keyw | Parameter | Description | Default | Type | |-----------|-------------|---------|------| -| `sms-provider` | SMS provider name | Not set | String | +| `sms-provider` | SMS provider (`twilio`, `aws`, `vonage`, `messagebird`, `custom`) | Not set | String | +| `sms-fallback-provider` | Fallback provider if primary fails | Not set | String | -### Example: MariaDB Connection +### Twilio Parameters + +| Parameter | Description | Default | Type | +|-----------|-------------|---------|------| +| `twilio-account-sid` | Twilio Account SID | Not set | String | +| `twilio-auth-token` | Twilio Auth Token | Not set | String | +| `twilio-phone-number` | Twilio phone number (E.164 format) | Not set | String | +| `twilio-messaging-service-sid` | Messaging Service SID for routing | Not set | String | +| `twilio-status-callback` | Webhook URL for delivery status | Not set | URL | + +### AWS SNS Parameters + +| Parameter | Description | Default | Type | +|-----------|-------------|---------|------| +| `aws-access-key-id` | AWS Access Key ID | Not set | String | +| `aws-secret-access-key` | AWS Secret Access Key | Not set | String | +| `aws-region` | AWS Region (e.g., `us-east-1`) | Not set | String | +| `aws-sns-sender-id` | Sender ID (alphanumeric) | Not set | String | +| `aws-sns-message-type` | `Promotional` or `Transactional` | `Transactional` | String | + +### Vonage (Nexmo) Parameters + +| Parameter | Description | Default | Type | +|-----------|-------------|---------|------| +| `vonage-api-key` | Vonage API Key | Not set | String | +| `vonage-api-secret` | Vonage API Secret | Not set | String | +| `vonage-from` | Sender number or alphanumeric ID | Not set | String | +| `vonage-callback-url` | Delivery receipt webhook | Not set | URL | + +### MessageBird Parameters + +| Parameter | Description | Default | Type | +|-----------|-------------|---------|------| +| `messagebird-access-key` | MessageBird Access Key | Not set | String | +| `messagebird-originator` | Sender number or name | Not set | String | +| `messagebird-report-url` | Status report webhook | Not set | URL | + +### Custom Provider Parameters + +| Parameter | Description | Default | Type | +|-----------|-------------|---------|------| +| `sms-custom-url` | API endpoint URL | Not set | URL | +| `sms-custom-method` | HTTP method (`POST`, `GET`) | `POST` | String | +| `sms-custom-auth-header` | Authorization header value | Not set | String | +| `sms-custom-body-template` | JSON body with `{{to}}`, `{{message}}` placeholders | Not set | String | +| `sms-custom-from` | Sender number for custom provider | Not set | String | + +### Example: Twilio Configuration ```csv -custom-server,db.example.com -custom-port,3306 -custom-database,myapp -custom-username,botuser -custom-password,secretpass +sms-provider,twilio +twilio-account-sid,ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +twilio-auth-token,your_auth_token +twilio-phone-number,+15551234567 ``` +### Example: AWS SNS Configuration +```csv +sms-provider,aws +aws-access-key-id,AKIAIOSFODNN7EXAMPLE +aws-secret-access-key,wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY +aws-region,us-east-1 +aws-sns-message-type,Transactional +``` + +See [SMS Provider Configuration](./sms-providers.md) for detailed setup instructions. + +## WhatsApp Parameters + +| Parameter | Description | Default | Type | +|-----------|-------------|---------|------| +| `whatsapp-api-key` | Access token from Meta Business | Not set | String | +| `whatsapp-phone-number-id` | Phone number ID from WhatsApp Business | Not set | String | +| `whatsapp-verify-token` | Token for webhook verification | Not set | String | +| `whatsapp-business-account-id` | WhatsApp Business Account ID | Not set | String | +| `whatsapp-api-version` | Graph API version | `v17.0` | String | + +### Example: WhatsApp Configuration +```csv +whatsapp-api-key,EAABs...your_access_token +whatsapp-phone-number-id,123456789012345 +whatsapp-verify-token,my-secret-verify-token +whatsapp-business-account-id,987654321098765 +``` + +See [WhatsApp Channel Configuration](./whatsapp-channel.md) for detailed setup instructions. + ## Multi-Agent Parameters ### Agent-to-Agent (A2A) Communication diff --git a/src/chapter-08-config/secrets-management.md b/src/08-config/secrets-management.md similarity index 100% rename from src/chapter-08-config/secrets-management.md rename to src/08-config/secrets-management.md diff --git a/src/08-config/sms-providers.md b/src/08-config/sms-providers.md new file mode 100644 index 00000000..3b6f91a4 --- /dev/null +++ b/src/08-config/sms-providers.md @@ -0,0 +1,471 @@ +# SMS Provider Configuration + +This guide covers configuration for SMS messaging in General Bots, supporting multiple providers including Twilio, AWS SNS, Vonage, and MessageBird. + +--- + +## Overview + +General Bots supports sending SMS messages through the `SEND SMS` keyword, with automatic provider detection based on your configuration. Multiple providers can be configured, with fallback support for reliability. + +--- + +## Quick Start + +### Minimal Configuration (Twilio) + +```csv +name,value +sms-provider,twilio +twilio-account-sid,ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +twilio-auth-token,your_auth_token +twilio-phone-number,+15551234567 +``` + +### Usage in BASIC + +```basic +SEND SMS "+15559876543", "Hello from General Bots!" +``` + +--- + +## Supported Providers + +| Provider | Key | Best For | +|----------|-----|----------| +| Twilio | `twilio` | General purpose, global reach | +| AWS SNS | `aws` or `aws_sns` | AWS ecosystem, high volume | +| Vonage (Nexmo) | `vonage` or `nexmo` | Europe, competitive pricing | +| MessageBird | `messagebird` | Europe, omnichannel | +| Custom | `custom` | Self-hosted or other providers | + +--- + +## Twilio Configuration + +Twilio is the default provider, offering reliable global SMS delivery. + +### Required Parameters + +| Parameter | Description | Example | +|-----------|-------------|---------| +| `sms-provider` | Set to `twilio` | `twilio` | +| `twilio-account-sid` | Your Twilio Account SID | `ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` | +| `twilio-auth-token` | Your Twilio Auth Token | `your_auth_token` | +| `twilio-phone-number` | Your Twilio phone number | `+15551234567` | + +### Optional Parameters + +| Parameter | Description | Default | +|-----------|-------------|---------| +| `twilio-messaging-service-sid` | Messaging Service SID (for advanced routing) | Not set | +| `twilio-status-callback` | Webhook URL for delivery status | Not set | + +### Complete Example + +```csv +name,value +sms-provider,twilio +twilio-account-sid,ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +twilio-auth-token,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +twilio-phone-number,+15551234567 +twilio-messaging-service-sid,MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +twilio-status-callback,https://yourbot.example.com/webhooks/sms-status +``` + +### Getting Twilio Credentials + +1. Sign up at [twilio.com](https://www.twilio.com) +2. Find your Account SID and Auth Token in the Console Dashboard +3. Purchase a phone number with SMS capabilities +4. Copy the phone number in E.164 format (+1XXXXXXXXXX) + +--- + +## AWS SNS Configuration + +Amazon SNS provides high-volume SMS delivery integrated with the AWS ecosystem. + +### Required Parameters + +| Parameter | Description | Example | +|-----------|-------------|---------| +| `sms-provider` | Set to `aws` or `aws_sns` | `aws` | +| `aws-access-key-id` | AWS Access Key ID | `AKIAIOSFODNN7EXAMPLE` | +| `aws-secret-access-key` | AWS Secret Access Key | `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` | +| `aws-region` | AWS Region | `us-east-1` | + +### Optional Parameters + +| Parameter | Description | Default | +|-----------|-------------|---------| +| `aws-sns-sender-id` | Sender ID (alphanumeric, where supported) | Not set | +| `aws-sns-message-type` | `Promotional` or `Transactional` | `Transactional` | + +### Complete Example + +```csv +name,value +sms-provider,aws +aws-access-key-id,AKIAIOSFODNN7EXAMPLE +aws-secret-access-key,wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY +aws-region,us-east-1 +aws-sns-sender-id,MyBot +aws-sns-message-type,Transactional +``` + +### AWS IAM Policy + +Ensure your IAM user has the following permissions: + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "sns:Publish" + ], + "Resource": "*" + } + ] +} +``` + +### Getting AWS Credentials + +1. Log into AWS Console +2. Go to IAM β†’ Users β†’ Create User +3. Attach the SNS publish policy +4. Create Access Key and save the credentials securely + +--- + +## Vonage (Nexmo) Configuration + +Vonage offers competitive pricing and strong European coverage. + +### Required Parameters + +| Parameter | Description | Example | +|-----------|-------------|---------| +| `sms-provider` | Set to `vonage` or `nexmo` | `vonage` | +| `vonage-api-key` | Vonage API Key | `abcd1234` | +| `vonage-api-secret` | Vonage API Secret | `AbCdEf123456` | +| `vonage-from` | Sender number or name | `+15551234567` or `MyBot` | + +### Optional Parameters + +| Parameter | Description | Default | +|-----------|-------------|---------| +| `vonage-callback-url` | Delivery receipt webhook | Not set | +| `vonage-client-ref` | Custom reference for tracking | Not set | + +### Complete Example + +```csv +name,value +sms-provider,vonage +vonage-api-key,abcd1234 +vonage-api-secret,AbCdEf123456789 +vonage-from,+15551234567 +vonage-callback-url,https://yourbot.example.com/webhooks/vonage +``` + +### Getting Vonage Credentials + +1. Sign up at [vonage.com](https://www.vonage.com) +2. Find API Key and Secret in the Dashboard +3. Purchase a virtual number or use alphanumeric sender ID + +--- + +## MessageBird Configuration + +MessageBird provides omnichannel messaging with strong European presence. + +### Required Parameters + +| Parameter | Description | Example | +|-----------|-------------|---------| +| `sms-provider` | Set to `messagebird` | `messagebird` | +| `messagebird-access-key` | MessageBird Access Key | `live_xxxxxxxxxxxxx` | +| `messagebird-originator` | Sender number or name | `+15551234567` | + +### Optional Parameters + +| Parameter | Description | Default | +|-----------|-------------|---------| +| `messagebird-report-url` | Status report webhook | Not set | +| `messagebird-validity` | Message validity in seconds | `86400` | +| `messagebird-gateway` | Gateway ID for routing | Not set | + +### Complete Example + +```csv +name,value +sms-provider,messagebird +messagebird-access-key,live_AbCdEfGhIjKlMnOpQrSt +messagebird-originator,+15551234567 +messagebird-report-url,https://yourbot.example.com/webhooks/messagebird +``` + +### Getting MessageBird Credentials + +1. Sign up at [messagebird.com](https://www.messagebird.com) +2. Create an Access Key in the Developers section +3. Purchase a number or configure alphanumeric sender + +--- + +## Custom Provider Configuration + +For self-hosted SMS gateways or providers not directly supported. + +### Parameters + +| Parameter | Description | Example | +|-----------|-------------|---------| +| `sms-provider` | Set to `custom` | `custom` | +| `sms-custom-url` | API endpoint URL | `https://sms.example.com/send` | +| `sms-custom-method` | HTTP method | `POST` | +| `sms-custom-auth-header` | Authorization header | `Bearer your-token` | +| `sms-custom-body-template` | JSON body template | See below | + +### Body Template + +Use placeholders for dynamic values: + +| Placeholder | Description | +|-------------|-------------| +| `{{to}}` | Recipient phone number | +| `{{message}}` | Message content | +| `{{from}}` | Sender number (if configured) | + +### Complete Example + +```csv +name,value +sms-provider,custom +sms-custom-url,https://sms.example.com/api/v1/send +sms-custom-method,POST +sms-custom-auth-header,Bearer abc123xyz +sms-custom-body-template,{"recipient":"{{to}}","text":"{{message}}","sender":"{{from}}"} +sms-custom-from,+15551234567 +``` + +--- + +## Using Multiple Providers + +Configure fallback providers for reliability: + +```csv +name,value +sms-provider,twilio +sms-fallback-provider,vonage + +# Primary: Twilio +twilio-account-sid,ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +twilio-auth-token,your_auth_token +twilio-phone-number,+15551234567 + +# Fallback: Vonage +vonage-api-key,abcd1234 +vonage-api-secret,AbCdEf123456789 +vonage-from,+15559876543 +``` + +When Twilio fails, General Bots automatically retries with Vonage. + +--- + +## BASIC Keyword Usage + +### Basic SMS + +```basic +' Send SMS using default provider +SEND SMS "+15559876543", "Your order has shipped!" +``` + +### SMS with Specific Provider + +```basic +' Use a specific provider +SEND SMS "+15559876543", "Important alert!", "aws" +``` + +### SMS with Error Handling + +```basic +ON ERROR RESUME NEXT + +SEND SMS customer_phone, "Your appointment is tomorrow at " + appointment_time + +IF ERROR THEN + PRINT "SMS failed: " + ERROR MESSAGE + ' Fallback to email + SEND MAIL customer_email, "Appointment Reminder", + "Your appointment is tomorrow at " + appointment_time, [] +ELSE + TALK "Reminder sent!" +END IF +``` + +### Bulk SMS + +```basic +ON ERROR RESUME NEXT + +customers = FIND "customers.csv", "notify_sms = true" + +sent = 0 +failed = 0 + +FOR EACH customer IN customers + SEND SMS customer.phone, "Flash sale! 20% off today only." + + IF ERROR THEN + PRINT "Failed to send to " + customer.phone + ": " + ERROR MESSAGE + failed = failed + 1 + CLEAR ERROR + ELSE + sent = sent + 1 + END IF + + WAIT 0.5 ' Rate limiting +NEXT + +TALK "Sent " + sent + " messages, " + failed + " failed" +``` + +--- + +## Phone Number Formats + +Always use E.164 format for phone numbers: + +| Country | Format | Example | +|---------|--------|---------| +| USA/Canada | +1XXXXXXXXXX | +15551234567 | +| UK | +44XXXXXXXXXX | +447911123456 | +| Brazil | +55XXXXXXXXXXX | +5511987654321 | +| Germany | +49XXXXXXXXXXX | +491512345678 | +| India | +91XXXXXXXXXX | +919876543210 | + +### Formatting in BASIC + +```basic +' Clean and format phone number +phone = REPLACE(raw_phone, " ", "") +phone = REPLACE(phone, "-", "") +phone = REPLACE(phone, "(", "") +phone = REPLACE(phone, ")", "") + +IF NOT phone LIKE "+*" THEN + phone = "+1" + phone ' Assume US if no country code +END IF + +SEND SMS phone, message +``` + +--- + +## Best Practices + +### 1. Respect Opt-Out + +```basic +' Check opt-out status before sending +customer = FIND "customers", "phone = '" + phone + "'" + +IF customer.sms_opt_out = true THEN + PRINT "Customer has opted out of SMS" + RETURN +END IF + +SEND SMS phone, message +``` + +### 2. Message Length + +- Standard SMS: 160 characters (GSM-7 encoding) +- Unicode SMS: 70 characters +- Longer messages are split and may incur additional charges + +```basic +' Check message length +IF LEN(message) > 160 THEN + PRINT "Warning: Message will be split into multiple SMS" +END IF +``` + +### 3. Rate Limiting + +Most providers have rate limits. Implement delays for bulk sending: + +```basic +FOR EACH recipient IN recipients + SEND SMS recipient.phone, message + WAIT 0.5 ' 2 messages per second max +NEXT +``` + +### 4. Secure Credentials + +Never hardcode credentials. Use `config.csv` or environment variables: + +```csv +# In config.csv - this file should not be committed to version control +twilio-account-sid,ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +twilio-auth-token,${TWILIO_AUTH_TOKEN} +``` + +--- + +## Troubleshooting + +### Common Errors + +| Error | Cause | Solution | +|-------|-------|----------| +| `INVALID_PHONE_NUMBER` | Wrong format | Use E.164 format (+1XXXXXXXXXX) | +| `AUTHENTICATION_ERROR` | Bad credentials | Verify API keys/tokens | +| `INSUFFICIENT_FUNDS` | Account balance low | Top up provider account | +| `RATE_LIMIT_EXCEEDED` | Too many requests | Add delays between messages | +| `UNREGISTERED_PHONE` | Number not active | Verify recipient number | +| `CARRIER_BLOCKED` | Carrier filtering | Contact provider support | + +### Testing + +Use provider test numbers during development: + +```csv +# Twilio Magic Numbers for testing +# +15005550006 - Valid number +# +15005550001 - Invalid number +# +15005550009 - Cannot route +``` + +### Checking Delivery Status + +If webhooks are configured, delivery status is received automatically. Otherwise, check provider dashboards for delivery reports. + +--- + +## Related Documentation + +- [SEND SMS Keyword](../chapter-06-gbdialog/keyword-sms.md) β€” BASIC keyword reference +- [Universal Messaging](../chapter-06-gbdialog/universal-messaging.md) β€” Multi-channel messaging +- [Secrets Management](./secrets-management.md) β€” Secure credential storage +- [WhatsApp Configuration](./whatsapp-channel.md) β€” WhatsApp setup guide +- [Teams Configuration](./teams-channel.md) β€” Microsoft Teams setup guide + +--- + +## Summary + +SMS messaging in General Bots supports multiple providers with a unified interface. Configure your preferred provider in `config.csv`, then use the `SEND SMS` keyword in your BASIC scripts. For production, configure fallback providers and implement proper error handling to ensure message delivery. \ No newline at end of file diff --git a/src/08-config/teams-channel.md b/src/08-config/teams-channel.md new file mode 100644 index 00000000..7f3bc4ad --- /dev/null +++ b/src/08-config/teams-channel.md @@ -0,0 +1,444 @@ +# Microsoft Teams Channel Configuration + +This guide covers setting up Microsoft Teams as a communication channel for your General Bots deployment, enabling bots to interact with users directly in Teams conversations. + +--- + +## Overview + +Microsoft Teams integration allows your bot to: +- Receive messages from Teams users +- Send responses back to Teams conversations +- Share files and documents +- Create adaptive cards for rich interactions +- Participate in group chats and channels + +--- + +## Quick Start + +### Minimal Configuration + +```csv +name,value +teams-app-id,your-app-id +teams-app-password,your-app-password +teams-tenant-id,your-tenant-id +teams-bot-id,your-bot-id +``` + +--- + +## Prerequisites + +Before configuring Teams, you need: + +1. **Microsoft 365 Account** with admin access +2. **Azure Subscription** for bot registration +3. **General Bots Server** accessible via HTTPS +4. **Valid SSL Certificate** (Teams requires HTTPS) + +--- + +## Configuration Parameters + +### Required Parameters + +| Parameter | Description | Example | +|-----------|-------------|---------| +| `teams-app-id` | Microsoft App ID from Azure Bot registration | `12345678-1234-1234-1234-123456789abc` | +| `teams-app-password` | Microsoft App Password (client secret) | `your-secret-password` | +| `teams-tenant-id` | Azure AD Tenant ID | `87654321-4321-4321-4321-cba987654321` | +| `teams-bot-id` | Bot's unique identifier in Teams | `28:12345678-1234-1234-1234-123456789abc` | + +### Optional Parameters + +| Parameter | Description | Default | +|-----------|-------------|---------| +| `teams-service-url` | Teams service endpoint | `https://smba.trafficmanager.net` | +| `teams-app-name` | Display name in Teams | Bot name from config | +| `teams-notify-url` | Proactive message webhook | Not set | + +### Complete Example + +```csv +name,value +teams-app-id,12345678-1234-1234-1234-123456789abc +teams-app-password,MySecretAppPassword123! +teams-tenant-id,87654321-4321-4321-4321-cba987654321 +teams-bot-id,28:12345678-1234-1234-1234-123456789abc +teams-service-url,https://smba.trafficmanager.net +teams-app-name,Support Bot +``` + +--- + +## Azure Bot Registration + +### Step 1: Create Azure Bot Resource + +1. Go to [Azure Portal](https://portal.azure.com) +2. Click **Create a resource** +3. Search for **Azure Bot** +4. Click **Create** + +### Step 2: Configure Bot Settings + +| Setting | Value | +|---------|-------| +| Bot handle | Your unique bot name | +| Subscription | Your Azure subscription | +| Resource group | Create new or use existing | +| Pricing tier | F0 (free) for testing, S1 for production | +| Microsoft App ID | Create new | + +### Step 3: Get Credentials + +After creation: + +1. Go to your Bot resource β†’ **Configuration** +2. Copy the **Microsoft App ID** β†’ Use as `teams-app-id` +3. Click **Manage** next to Microsoft App ID +4. Go to **Certificates & secrets** β†’ **New client secret** +5. Copy the secret value β†’ Use as `teams-app-password` + +### Step 4: Configure Messaging Endpoint + +Set the messaging endpoint to your General Bots server: + +``` +https://your-server.example.com/api/messages/teams +``` + +### Step 5: Enable Teams Channel + +1. In your Azure Bot resource, go to **Channels** +2. Click **Microsoft Teams** +3. Accept the terms of service +4. Click **Apply** + +--- + +## Teams App Manifest + +Create a Teams app manifest to install the bot in Teams. + +### manifest.json + +```json +{ + "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", + "manifestVersion": "1.16", + "version": "1.0.0", + "id": "{{teams-app-id}}", + "packageName": "com.example.generalbotsbot", + "developer": { + "name": "Your Company", + "websiteUrl": "https://example.com", + "privacyUrl": "https://example.com/privacy", + "termsOfUseUrl": "https://example.com/terms" + }, + "name": { + "short": "Support Bot", + "full": "General Bots Support Assistant" + }, + "description": { + "short": "AI-powered support assistant", + "full": "An AI-powered support assistant that can answer questions, look up information, and help with common tasks." + }, + "icons": { + "color": "color.png", + "outline": "outline.png" + }, + "accentColor": "#1565C0", + "bots": [ + { + "botId": "{{teams-app-id}}", + "scopes": ["personal", "team", "groupchat"], + "supportsFiles": true, + "isNotificationOnly": false, + "commandLists": [ + { + "scopes": ["personal", "team", "groupchat"], + "commands": [ + { + "title": "help", + "description": "Get help and available commands" + }, + { + "title": "status", + "description": "Check system status" + } + ] + } + ] + } + ], + "permissions": ["identity", "messageTeamMembers"], + "validDomains": ["your-server.example.com"] +} +``` + +### Creating the App Package + +1. Create a folder with: + - `manifest.json` + - `color.png` (192x192 pixels) + - `outline.png` (32x32 pixels, transparent) +2. Zip the folder contents +3. Upload to Teams Admin Center or sideload + +--- + +## Installing the Bot in Teams + +### For Testing (Sideload) + +1. Open Microsoft Teams +2. Go to **Apps** β†’ **Manage your apps** +3. Click **Upload an app** β†’ **Upload a custom app** +4. Select your zip file +5. Click **Add** + +### For Organization-Wide Deployment + +1. Go to [Teams Admin Center](https://admin.teams.microsoft.com) +2. Navigate to **Teams apps** β†’ **Manage apps** +3. Click **Upload new app** +4. Upload your zip file +5. Configure policies to allow the app + +--- + +## BASIC Usage Examples + +### Sending Messages + +```basic +' Reply to Teams message +TALK "Hello from General Bots!" +``` + +### Sending Adaptive Cards + +```basic +' Create an adaptive card +card = #{ + "type": "AdaptiveCard", + "version": "1.4", + "body": [ + #{ + "type": "TextBlock", + "size": "Large", + "weight": "Bolder", + "text": "Order Confirmation" + }, + #{ + "type": "TextBlock", + "text": "Order #" + order_id + " has been confirmed." + }, + #{ + "type": "FactSet", + "facts": [ + #{ "title": "Order Date", "value": FORMAT(NOW(), "MMMM DD, YYYY") }, + #{ "title": "Total", "value": "$" + FORMAT(total, "#,##0.00") } + ] + } + ], + "actions": [ + #{ + "type": "Action.OpenUrl", + "title": "View Order", + "url": "https://example.com/orders/" + order_id + } + ] +} + +CARD card +``` + +### Sending Files + +```basic +' Generate and send a report +report = GENERATE PDF "templates/report.html", report_data, "temp/report.pdf" + +DOWNLOAD report.url AS "Monthly Report.pdf" +``` + +### Proactive Messages + +```basic +' Send a proactive message to a user +' Requires stored conversation reference +SET HEADER "Authorization", "Bearer " + access_token + +POST "https://smba.trafficmanager.net/apis/v3/conversations/" + conversation_id + "/activities", + #{ + "type": "message", + "text": "Your scheduled report is ready!" + } +``` + +--- + +## Authentication + +### Single Sign-On (SSO) + +Enable Teams SSO for seamless authentication: + +```csv +name,value +teams-app-id,your-app-id +teams-app-password,your-app-password +teams-sso-enabled,true +teams-sso-connection-name,AzureAD +``` + +### Getting User Identity + +```basic +' The user's Teams identity is available in the session +user_name = user.name +user_email = user.email +user_id = user.id + +TALK "Hello, " + user_name + "!" +``` + +--- + +## Multi-Tenant Configuration + +For bots available to multiple organizations: + +```csv +name,value +teams-app-id,your-app-id +teams-app-password,your-app-password +teams-tenant-id,common +teams-multi-tenant,true +``` + +When `teams-tenant-id` is set to `common`, the bot accepts connections from any Azure AD tenant. + +--- + +## Handling Different Contexts + +### Personal Chat + +```basic +' Check if in personal chat +IF context.type = "personal" THEN + TALK "This is a private conversation. How can I help?" +END IF +``` + +### Group Chat + +```basic +' Check if in group chat +IF context.type = "groupchat" THEN + TALK "I'm here to help the group. Mention me with @bot to get my attention." +END IF +``` + +### Team Channel + +```basic +' Check if in team channel +IF context.type = "channel" THEN + channel_name = context.channel.name + TALK "Hello, " + channel_name + " channel!" +END IF +``` + +--- + +## Troubleshooting + +### Common Errors + +| Error | Cause | Solution | +|-------|-------|----------| +| `Teams not configured` | Missing required parameters | Set all required config values | +| `401 Unauthorized` | Invalid credentials | Verify app-id and app-password | +| `403 Forbidden` | Bot not authorized | Check Azure Bot channel config | +| `404 Not Found` | Wrong endpoint URL | Verify messaging endpoint | +| `Service URL mismatch` | Wrong service URL | Use URL from activity | + +### Verifying Configuration + +```basic +' Check if Teams is configured +IF teams_configured THEN + TALK "Teams is ready!" +ELSE + PRINT "Error: Teams adapter not configured" + PRINT "Please set teams-app-id and teams-app-password in config.csv" +END IF +``` + +### Checking Connectivity + +1. Ensure your server is accessible from the internet +2. Verify HTTPS with valid SSL certificate +3. Test the messaging endpoint: `https://your-server/api/messages/teams` +4. Check Azure Bot resource health in Azure Portal + +### Logs + +Enable detailed logging for troubleshooting: + +```csv +name,value +log-level,debug +teams-log-activities,true +``` + +--- + +## Security Best Practices + +### 1. Secure Credentials + +Never commit credentials to version control: + +```csv +# Use environment variable references +teams-app-password,${TEAMS_APP_PASSWORD} +``` + +### 2. Validate Tokens + +General Bots automatically validates incoming tokens from Teams. Ensure your server clock is synchronized (NTP). + +### 3. Limit Permissions + +Request only necessary permissions in your app manifest: + +```json +"permissions": ["identity"] +``` + +### 4. Use HTTPS + +Teams requires HTTPS with a valid certificate. Self-signed certificates are not accepted. + +--- + +## Related Documentation + +- [WhatsApp Configuration](./whatsapp-channel.md) β€” WhatsApp channel setup +- [SMS Configuration](./sms-providers.md) β€” SMS provider configuration +- [Universal Messaging](../chapter-06-gbdialog/universal-messaging.md) β€” Multi-channel messaging +- [Secrets Management](./secrets-management.md) β€” Secure credential storage +- [CARD Keyword](../chapter-06-gbdialog/keyword-card.md) β€” Creating rich cards + +--- + +## Summary + +Microsoft Teams integration enables your General Bots deployment to interact with users in their familiar Teams environment. Configure the required parameters in `config.csv`, register your bot in Azure, create and install the Teams app manifest, and your bot is ready to chat. Use adaptive cards for rich interactions and leverage Teams SSO for seamless authentication. \ No newline at end of file diff --git a/src/08-config/whatsapp-channel.md b/src/08-config/whatsapp-channel.md new file mode 100644 index 00000000..cae26c35 --- /dev/null +++ b/src/08-config/whatsapp-channel.md @@ -0,0 +1,473 @@ +# WhatsApp Channel Configuration + +This guide covers setting up WhatsApp Business API as a communication channel for your General Bots deployment, enabling bots to interact with users on WhatsApp. + +--- + +## Overview + +WhatsApp integration allows your bot to: +- Receive and respond to WhatsApp messages +- Send rich media (images, documents, audio, video) +- Use interactive buttons and lists +- Send template messages for notifications +- Handle group conversations + +--- + +## Quick Start + +### Minimal Configuration + +```csv +name,value +whatsapp-api-key,your_access_token +whatsapp-phone-number-id,your_phone_number_id +whatsapp-verify-token,your_webhook_verify_token +``` + +--- + +## Prerequisites + +Before configuring WhatsApp, you need: + +1. **Meta Business Account** at [business.facebook.com](https://business.facebook.com) +2. **WhatsApp Business Account** linked to Meta Business +3. **Phone Number** registered with WhatsApp Business API +4. **General Bots Server** accessible via HTTPS with valid SSL + +--- + +## Configuration Parameters + +### Required Parameters + +| Parameter | Description | Example | +|-----------|-------------|---------| +| `whatsapp-api-key` | Access token from Meta Business | `EAABs...ZDZd` | +| `whatsapp-phone-number-id` | Phone number ID from WhatsApp Business | `123456789012345` | +| `whatsapp-verify-token` | Token for webhook verification | `my-secret-verify-token` | + +### Optional Parameters + +| Parameter | Description | Default | +|-----------|-------------|---------| +| `whatsapp-business-account-id` | WhatsApp Business Account ID | Not set | +| `whatsapp-api-version` | Graph API version | `v17.0` | +| `whatsapp-webhook-url` | Custom webhook URL | `/webhooks/whatsapp` | + +### Complete Example + +```csv +name,value +whatsapp-api-key,EAABsBcDeFgHiJkLmNoPqRsTuVwXyZ123456789 +whatsapp-phone-number-id,123456789012345 +whatsapp-verify-token,my-super-secret-verify-token-2024 +whatsapp-business-account-id,987654321098765 +whatsapp-api-version,v17.0 +``` + +--- + +## Meta Business Setup + +### Step 1: Create Meta Business Account + +1. Go to [business.facebook.com](https://business.facebook.com) +2. Click **Create Account** +3. Complete business verification + +### Step 2: Create WhatsApp Business Account + +1. In Meta Business Suite, go to **All tools** β†’ **WhatsApp Manager** +2. Click **Get Started** or **Add WhatsApp Account** +3. Follow the setup wizard + +### Step 3: Add Phone Number + +1. In WhatsApp Manager, go to **Phone Numbers** +2. Click **Add Phone Number** +3. Verify the number via SMS or voice call +4. Note the **Phone Number ID** for configuration + +### Step 4: Generate Access Token + +1. Go to [developers.facebook.com](https://developers.facebook.com) +2. Create or select your app +3. Add **WhatsApp** product to your app +4. Go to **WhatsApp** β†’ **API Setup** +5. Generate a **Permanent Access Token**: + - Click **Add System User** + - Grant `whatsapp_business_messaging` permission + - Generate token + +### Step 5: Configure Webhook + +1. In your Meta app, go to **WhatsApp** β†’ **Configuration** +2. Click **Edit** next to Webhook +3. Set **Callback URL**: `https://your-server.example.com/webhooks/whatsapp` +4. Set **Verify Token**: Same as `whatsapp-verify-token` in config.csv +5. Click **Verify and Save** +6. Subscribe to webhook fields: + - `messages` + - `message_deliveries` (optional) + - `message_reads` (optional) + +--- + +## BASIC Usage Examples + +### Sending Text Messages + +```basic +' Reply to WhatsApp message +TALK "Hello! How can I help you today?" +``` + +### Sending Images + +```basic +' Send an image +image_url = "https://example.com/product.jpg" +CARD #{ + "type": "image", + "url": image_url, + "caption": "Here's the product you asked about" +} +``` + +### Sending Documents + +```basic +' Generate and send a document +report = GENERATE PDF "templates/invoice.html", invoice_data, "temp/invoice.pdf" +DOWNLOAD report.url AS "Invoice.pdf" +``` + +### Interactive Buttons + +```basic +' Send message with buttons +CARD #{ + "type": "interactive", + "interactive": #{ + "type": "button", + "body": #{ + "text": "Would you like to proceed with your order?" + }, + "action": #{ + "buttons": [ + #{ "type": "reply", "reply": #{ "id": "confirm", "title": "βœ“ Confirm" } }, + #{ "type": "reply", "reply": #{ "id": "cancel", "title": "βœ— Cancel" } } + ] + } + } +} +``` + +### Interactive Lists + +```basic +' Send a list selection +CARD #{ + "type": "interactive", + "interactive": #{ + "type": "list", + "header": #{ + "type": "text", + "text": "Select a Category" + }, + "body": #{ + "text": "Choose from our product categories:" + }, + "action": #{ + "button": "View Categories", + "sections": [ + #{ + "title": "Electronics", + "rows": [ + #{ "id": "phones", "title": "Phones", "description": "Smartphones and accessories" }, + #{ "id": "laptops", "title": "Laptops", "description": "Notebooks and tablets" } + ] + }, + #{ + "title": "Home", + "rows": [ + #{ "id": "furniture", "title": "Furniture", "description": "Tables, chairs, sofas" }, + #{ "id": "appliances", "title": "Appliances", "description": "Kitchen and home appliances" } + ] + } + ] + } + } +} +``` + +### Template Messages + +Template messages are pre-approved messages for notifications: + +```basic +' Send a template message (must be approved by Meta) +SEND TEMPLATE "whatsapp", customer_phone, "order_confirmation", #{ + "1": order_id, + "2": order_total, + "3": delivery_date +} +``` + +--- + +## Message Templates + +### Creating Templates + +1. Go to WhatsApp Manager β†’ **Message Templates** +2. Click **Create Template** +3. Choose category (Marketing, Utility, Authentication) +4. Define template with variables: `{{1}}`, `{{2}}`, etc. +5. Submit for approval + +### Template Example + +**Name:** `order_shipped` +**Category:** Utility +**Content:** +``` +Hi {{1}}! πŸ“¦ + +Your order #{{2}} has been shipped! + +Tracking number: {{3}} +Estimated delivery: {{4}} + +Track your package: {{5}} +``` + +### Using Templates in BASIC + +```basic +SEND TEMPLATE "whatsapp", customer.phone, "order_shipped", #{ + "1": customer.name, + "2": order.id, + "3": tracking_number, + "4": estimated_delivery, + "5": tracking_url +} +``` + +--- + +## Handling Media + +### Receiving Media + +```basic +' Check if message contains media +IF message.type = "image" THEN + image_url = message.image.url + TALK "I received your image. Let me analyze it..." + ' Process image +ELSE IF message.type = "document" THEN + doc_url = message.document.url + doc_name = message.document.filename + TALK "I received " + doc_name + ". Processing..." +END IF +``` + +### Sending Different Media Types + +```basic +' Audio +CARD #{ "type": "audio", "url": "https://example.com/message.mp3" } + +' Video +CARD #{ "type": "video", "url": "https://example.com/demo.mp4", "caption": "Product demo" } + +' Location +CARD #{ + "type": "location", + "latitude": -23.5505, + "longitude": -46.6333, + "name": "Our Store", + "address": "123 Main Street" +} + +' Contact +CARD #{ + "type": "contacts", + "contacts": [ + #{ + "name": #{ "formatted_name": "Support Team" }, + "phones": [#{ "phone": "+15551234567", "type": "WORK" }] + } + ] +} +``` + +--- + +## Rate Limits and Best Practices + +### Messaging Limits + +| Tier | Messages/24h | How to Upgrade | +|------|--------------|----------------| +| Tier 1 | 1,000 | Verify business | +| Tier 2 | 10,000 | Good quality rating | +| Tier 3 | 100,000 | Sustained quality | +| Tier 4 | Unlimited | Top quality rating | + +### Quality Rating + +Maintain quality by: +- Responding within 24 hours +- Avoiding spam complaints +- Using templates appropriately +- Providing value in conversations + +### 24-Hour Window + +- **User-initiated**: Free-form messages allowed for 24 hours after user message +- **Business-initiated**: Only template messages outside the 24-hour window + +```basic +' Check if within messaging window +IF within_24h_window THEN + TALK "Here's your update: " + update_text +ELSE + ' Use template for out-of-window message + SEND TEMPLATE "whatsapp", phone, "update_notification", #{ "1": update_text } +END IF +``` + +--- + +## Error Handling + +```basic +ON ERROR RESUME NEXT + +TALK "Processing your request..." + +IF ERROR THEN + error_msg = ERROR MESSAGE + + IF INSTR(error_msg, "rate limit") > 0 THEN + PRINT "Rate limited, queuing message for retry" + ' Queue for later + ELSE IF INSTR(error_msg, "invalid phone") > 0 THEN + PRINT "Invalid phone number format" + ELSE IF INSTR(error_msg, "not registered") > 0 THEN + PRINT "User not on WhatsApp" + ELSE + PRINT "WhatsApp error: " + error_msg + END IF +END IF +``` + +### Common Errors + +| Error Code | Meaning | Solution | +|------------|---------|----------| +| 131030 | User not on WhatsApp | Verify phone number | +| 131047 | Re-engagement required | Send template message | +| 131048 | Spam rate limit | Reduce message frequency | +| 131051 | Unsupported message type | Check message format | +| 131052 | Media download failed | Verify media URL | +| 132000 | Template not found | Check template name | +| 132001 | Template paused | Resume in WhatsApp Manager | +| 133010 | Phone not registered | Complete phone verification | + +--- + +## Webhook Security + +### Validating Requests + +General Bots automatically validates webhook signatures. Ensure your `whatsapp-verify-token` is kept secret. + +### Recommended Setup + +```csv +name,value +whatsapp-verify-token,a-very-long-random-string-that-is-hard-to-guess +whatsapp-validate-signature,true +whatsapp-app-secret,your_app_secret_from_meta +``` + +--- + +## Testing + +### Test Numbers + +Use Meta's test phone numbers during development: + +1. In App Dashboard, go to **WhatsApp** β†’ **API Setup** +2. Use the **Test Phone Number** provided +3. Add your phone as a test recipient + +### Sending Test Messages + +```basic +' Test message to verified number +test_phone = "+15551234567" ' Must be in test recipients list +SEND SMS test_phone, "Test message from General Bots" +``` + +--- + +## Production Checklist + +- [ ] Business verification completed +- [ ] Phone number verified and registered +- [ ] Permanent access token generated +- [ ] Webhook configured and verified +- [ ] Message templates approved +- [ ] SSL certificate valid +- [ ] Error handling implemented +- [ ] Rate limiting considered +- [ ] Quality guidelines reviewed + +--- + +## Troubleshooting + +### Webhook Not Receiving Messages + +1. Verify callback URL is HTTPS with valid SSL +2. Check verify token matches configuration +3. Ensure webhook fields are subscribed +4. Check server logs for incoming requests + +### Messages Not Sending + +1. Verify access token is valid and not expired +2. Check phone number ID is correct +3. Ensure recipient is on WhatsApp +4. Check for rate limit errors + +### Template Messages Failing + +1. Verify template is approved +2. Check template name is correct +3. Ensure all variables are provided +4. Verify language code matches + +--- + +## Related Documentation + +- [Teams Configuration](./teams-channel.md) β€” Microsoft Teams setup +- [SMS Configuration](./sms-providers.md) β€” SMS provider configuration +- [Universal Messaging](../chapter-06-gbdialog/universal-messaging.md) β€” Multi-channel messaging +- [SEND TEMPLATE Keyword](../chapter-06-gbdialog/keyword-send-template.md) β€” Template messaging +- [CARD Keyword](../chapter-06-gbdialog/keyword-card.md) β€” Rich card messages + +--- + +## Summary + +WhatsApp Business API integration enables your General Bots deployment to communicate with billions of WhatsApp users. Configure the required parameters from Meta Business, set up webhooks, create message templates for notifications, and your bot is ready to engage customers on their preferred messaging platform. Follow quality guidelines and respect the 24-hour messaging window to maintain a high quality rating. \ No newline at end of file diff --git a/src/chapter-09-tools/README.md b/src/09-tools/README.md similarity index 100% rename from src/chapter-09-tools/README.md rename to src/09-tools/README.md diff --git a/src/chapter-09-tools/compilation.md b/src/09-tools/compilation.md similarity index 100% rename from src/chapter-09-tools/compilation.md rename to src/09-tools/compilation.md diff --git a/src/chapter-09-tools/external-apis.md b/src/09-tools/external-apis.md similarity index 100% rename from src/chapter-09-tools/external-apis.md rename to src/09-tools/external-apis.md diff --git a/src/chapter-09-tools/get-integration.md b/src/09-tools/get-integration.md similarity index 100% rename from src/chapter-09-tools/get-integration.md rename to src/09-tools/get-integration.md diff --git a/src/chapter-09-tools/llm-rest-server.md b/src/09-tools/llm-rest-server.md similarity index 100% rename from src/chapter-09-tools/llm-rest-server.md rename to src/09-tools/llm-rest-server.md diff --git a/src/chapter-09-tools/mcp-format.md b/src/09-tools/mcp-format.md similarity index 100% rename from src/chapter-09-tools/mcp-format.md rename to src/09-tools/mcp-format.md diff --git a/src/chapter-09-tools/nvidia-gpu-setup.md b/src/09-tools/nvidia-gpu-setup.md similarity index 100% rename from src/chapter-09-tools/nvidia-gpu-setup.md rename to src/09-tools/nvidia-gpu-setup.md diff --git a/src/chapter-09-tools/openai-format.md b/src/09-tools/openai-format.md similarity index 99% rename from src/chapter-09-tools/openai-format.md rename to src/09-tools/openai-format.md index 640ee401..afafd8bc 100644 --- a/src/chapter-09-tools/openai-format.md +++ b/src/09-tools/openai-format.md @@ -84,7 +84,7 @@ When using OpenAI's API, the functions are passed in the request: ```json { - "model": "gpt-4", + "model": "gpt-4o", "messages": [...], "functions": [ { diff --git a/src/chapter-09-tools/param-declaration.md b/src/09-tools/param-declaration.md similarity index 100% rename from src/chapter-09-tools/param-declaration.md rename to src/09-tools/param-declaration.md diff --git a/src/chapter-09-tools/tool-definition.md b/src/09-tools/tool-definition.md similarity index 100% rename from src/chapter-09-tools/tool-definition.md rename to src/09-tools/tool-definition.md diff --git a/src/chapter-10-rest/README.md b/src/10-rest/README.md similarity index 100% rename from src/chapter-10-rest/README.md rename to src/10-rest/README.md diff --git a/src/chapter-10-rest/admin-api.md b/src/10-rest/admin-api.md similarity index 100% rename from src/chapter-10-rest/admin-api.md rename to src/10-rest/admin-api.md diff --git a/src/chapter-10-rest/ai-api.md b/src/10-rest/ai-api.md similarity index 100% rename from src/chapter-10-rest/ai-api.md rename to src/10-rest/ai-api.md diff --git a/src/chapter-10-rest/analytics-api.md b/src/10-rest/analytics-api.md similarity index 100% rename from src/chapter-10-rest/analytics-api.md rename to src/10-rest/analytics-api.md diff --git a/src/chapter-10-rest/assets/api-architecture.svg.backup b/src/10-rest/assets/api-architecture.svg.backup similarity index 100% rename from src/chapter-10-rest/assets/api-architecture.svg.backup rename to src/10-rest/assets/api-architecture.svg.backup diff --git a/src/chapter-10-rest/assets/api-request-flow.svg.backup b/src/10-rest/assets/api-request-flow.svg.backup similarity index 100% rename from src/chapter-10-rest/assets/api-request-flow.svg.backup rename to src/10-rest/assets/api-request-flow.svg.backup diff --git a/src/chapter-10-rest/backup-api.md b/src/10-rest/backup-api.md similarity index 100% rename from src/chapter-10-rest/backup-api.md rename to src/10-rest/backup-api.md diff --git a/src/chapter-10-rest/calendar-api.md b/src/10-rest/calendar-api.md similarity index 100% rename from src/chapter-10-rest/calendar-api.md rename to src/10-rest/calendar-api.md diff --git a/src/chapter-10-rest/calls-api.md b/src/10-rest/calls-api.md similarity index 100% rename from src/chapter-10-rest/calls-api.md rename to src/10-rest/calls-api.md diff --git a/src/chapter-10-rest/compliance-api.md b/src/10-rest/compliance-api.md similarity index 100% rename from src/chapter-10-rest/compliance-api.md rename to src/10-rest/compliance-api.md diff --git a/src/chapter-10-rest/conversations-api.md b/src/10-rest/conversations-api.md similarity index 100% rename from src/chapter-10-rest/conversations-api.md rename to src/10-rest/conversations-api.md diff --git a/src/chapter-10-rest/document-processing.md b/src/10-rest/document-processing.md similarity index 100% rename from src/chapter-10-rest/document-processing.md rename to src/10-rest/document-processing.md diff --git a/src/chapter-10-rest/email-api.md b/src/10-rest/email-api.md similarity index 100% rename from src/chapter-10-rest/email-api.md rename to src/10-rest/email-api.md diff --git a/src/chapter-10-rest/examples.md b/src/10-rest/examples.md similarity index 100% rename from src/chapter-10-rest/examples.md rename to src/10-rest/examples.md diff --git a/src/chapter-10-rest/files-api.md b/src/10-rest/files-api.md similarity index 100% rename from src/chapter-10-rest/files-api.md rename to src/10-rest/files-api.md diff --git a/src/chapter-10-rest/group-membership.md b/src/10-rest/group-membership.md similarity index 100% rename from src/chapter-10-rest/group-membership.md rename to src/10-rest/group-membership.md diff --git a/src/chapter-10-rest/groups-api.md b/src/10-rest/groups-api.md similarity index 100% rename from src/chapter-10-rest/groups-api.md rename to src/10-rest/groups-api.md diff --git a/src/chapter-10-rest/ml-api.md b/src/10-rest/ml-api.md similarity index 100% rename from src/chapter-10-rest/ml-api.md rename to src/10-rest/ml-api.md diff --git a/src/chapter-10-rest/monitoring-api.md b/src/10-rest/monitoring-api.md similarity index 100% rename from src/chapter-10-rest/monitoring-api.md rename to src/10-rest/monitoring-api.md diff --git a/src/chapter-10-rest/notifications-api.md b/src/10-rest/notifications-api.md similarity index 100% rename from src/chapter-10-rest/notifications-api.md rename to src/10-rest/notifications-api.md diff --git a/src/chapter-10-rest/opensource-components.md b/src/10-rest/opensource-components.md similarity index 100% rename from src/chapter-10-rest/opensource-components.md rename to src/10-rest/opensource-components.md diff --git a/src/chapter-10-rest/reports-api.md b/src/10-rest/reports-api.md similarity index 100% rename from src/chapter-10-rest/reports-api.md rename to src/10-rest/reports-api.md diff --git a/src/chapter-10-rest/security-api.md b/src/10-rest/security-api.md similarity index 100% rename from src/chapter-10-rest/security-api.md rename to src/10-rest/security-api.md diff --git a/src/chapter-10-rest/storage-api.md b/src/10-rest/storage-api.md similarity index 100% rename from src/chapter-10-rest/storage-api.md rename to src/10-rest/storage-api.md diff --git a/src/chapter-10-rest/tasks-api.md b/src/10-rest/tasks-api.md similarity index 100% rename from src/chapter-10-rest/tasks-api.md rename to src/10-rest/tasks-api.md diff --git a/src/chapter-10-rest/user-security.md b/src/10-rest/user-security.md similarity index 100% rename from src/chapter-10-rest/user-security.md rename to src/10-rest/user-security.md diff --git a/src/chapter-10-rest/users-api.md b/src/10-rest/users-api.md similarity index 100% rename from src/chapter-10-rest/users-api.md rename to src/10-rest/users-api.md diff --git a/src/chapter-10-rest/whiteboard-api.md b/src/10-rest/whiteboard-api.md similarity index 100% rename from src/chapter-10-rest/whiteboard-api.md rename to src/10-rest/whiteboard-api.md diff --git a/src/chapter-11-features/README.md b/src/11-features/README.md similarity index 100% rename from src/chapter-11-features/README.md rename to src/11-features/README.md diff --git a/src/chapter-11-features/ai-llm.md b/src/11-features/ai-llm.md similarity index 99% rename from src/chapter-11-features/ai-llm.md rename to src/11-features/ai-llm.md index 96662659..d6a24ad6 100644 --- a/src/chapter-11-features/ai-llm.md +++ b/src/11-features/ai-llm.md @@ -18,7 +18,7 @@ Configuration requires setting your API key and selecting a model: ``` OPENAI_API_KEY=your-api-key -LLM_MODEL=gpt-4 +LLM_MODEL=gpt-5 ``` ### Local Models diff --git a/src/chapter-11-features/attendant-llm-assist.md b/src/11-features/attendant-llm-assist.md similarity index 100% rename from src/chapter-11-features/attendant-llm-assist.md rename to src/11-features/attendant-llm-assist.md diff --git a/src/chapter-11-features/automation.md b/src/11-features/automation.md similarity index 100% rename from src/chapter-11-features/automation.md rename to src/11-features/automation.md diff --git a/src/chapter-11-features/channels.md b/src/11-features/channels.md similarity index 100% rename from src/chapter-11-features/channels.md rename to src/11-features/channels.md diff --git a/src/chapter-11-features/conversation.md b/src/11-features/conversation.md similarity index 100% rename from src/chapter-11-features/conversation.md rename to src/11-features/conversation.md diff --git a/src/chapter-11-features/core-features.md b/src/11-features/core-features.md similarity index 100% rename from src/chapter-11-features/core-features.md rename to src/11-features/core-features.md diff --git a/src/chapter-11-features/drive-monitor.md b/src/11-features/drive-monitor.md similarity index 100% rename from src/chapter-11-features/drive-monitor.md rename to src/11-features/drive-monitor.md diff --git a/src/chapter-11-features/editions.md b/src/11-features/editions.md similarity index 100% rename from src/chapter-11-features/editions.md rename to src/11-features/editions.md diff --git a/src/chapter-11-features/email.md b/src/11-features/email.md similarity index 100% rename from src/chapter-11-features/email.md rename to src/11-features/email.md diff --git a/src/chapter-11-features/hybrid-search.md b/src/11-features/hybrid-search.md similarity index 100% rename from src/chapter-11-features/hybrid-search.md rename to src/11-features/hybrid-search.md diff --git a/src/chapter-11-features/knowledge-base.md b/src/11-features/knowledge-base.md similarity index 100% rename from src/chapter-11-features/knowledge-base.md rename to src/11-features/knowledge-base.md diff --git a/src/chapter-11-features/m365-comparison.md b/src/11-features/m365-comparison.md similarity index 100% rename from src/chapter-11-features/m365-comparison.md rename to src/11-features/m365-comparison.md diff --git a/src/chapter-11-features/memory-management.md b/src/11-features/memory-management.md similarity index 100% rename from src/chapter-11-features/memory-management.md rename to src/11-features/memory-management.md diff --git a/src/chapter-11-features/multi-agent-design.md b/src/11-features/multi-agent-design.md similarity index 100% rename from src/chapter-11-features/multi-agent-design.md rename to src/11-features/multi-agent-design.md diff --git a/src/chapter-11-features/multi-agent-orchestration.md b/src/11-features/multi-agent-orchestration.md similarity index 99% rename from src/chapter-11-features/multi-agent-orchestration.md rename to src/11-features/multi-agent-orchestration.md index 8287b86b..d9764e9c 100644 --- a/src/chapter-11-features/multi-agent-orchestration.md +++ b/src/11-features/multi-agent-orchestration.md @@ -224,7 +224,7 @@ name,value model-routing-strategy,auto model-default,fast model-fast,DeepSeek-R3-Distill-Qwen-1.5B-Q3_K_M.gguf -model-quality,gpt-4 +model-quality,claude-sonnet-4.5 model-code,codellama-7b.gguf ``` diff --git a/src/chapter-11-features/platform-comparison.md b/src/11-features/platform-comparison.md similarity index 100% rename from src/chapter-11-features/platform-comparison.md rename to src/11-features/platform-comparison.md diff --git a/src/chapter-11-features/projects.md b/src/11-features/projects.md similarity index 100% rename from src/chapter-11-features/projects.md rename to src/11-features/projects.md diff --git a/src/chapter-11-features/storage.md b/src/11-features/storage.md similarity index 100% rename from src/chapter-11-features/storage.md rename to src/11-features/storage.md diff --git a/src/chapter-11-features/transfer-to-human.md b/src/11-features/transfer-to-human.md similarity index 100% rename from src/chapter-11-features/transfer-to-human.md rename to src/11-features/transfer-to-human.md diff --git a/src/chapter-11-features/whats-new.md b/src/11-features/whats-new.md similarity index 100% rename from src/chapter-11-features/whats-new.md rename to src/11-features/whats-new.md diff --git a/src/chapter-12-auth/README.md b/src/12-auth/README.md similarity index 100% rename from src/chapter-12-auth/README.md rename to src/12-auth/README.md diff --git a/src/chapter-12-auth/api-endpoints.md b/src/12-auth/api-endpoints.md similarity index 100% rename from src/chapter-12-auth/api-endpoints.md rename to src/12-auth/api-endpoints.md diff --git a/src/chapter-12-auth/bot-auth.md b/src/12-auth/bot-auth.md similarity index 100% rename from src/chapter-12-auth/bot-auth.md rename to src/12-auth/bot-auth.md diff --git a/src/chapter-12-auth/compliance-requirements.md b/src/12-auth/compliance-requirements.md similarity index 100% rename from src/chapter-12-auth/compliance-requirements.md rename to src/12-auth/compliance-requirements.md diff --git a/src/chapter-12-auth/password-security.md b/src/12-auth/password-security.md similarity index 100% rename from src/chapter-12-auth/password-security.md rename to src/12-auth/password-security.md diff --git a/src/chapter-12-auth/permissions-compliance.md b/src/12-auth/permissions-compliance.md similarity index 100% rename from src/chapter-12-auth/permissions-compliance.md rename to src/12-auth/permissions-compliance.md diff --git a/src/chapter-12-auth/permissions-matrix.md b/src/12-auth/permissions-matrix.md similarity index 100% rename from src/chapter-12-auth/permissions-matrix.md rename to src/12-auth/permissions-matrix.md diff --git a/src/chapter-12-auth/security-features.md b/src/12-auth/security-features.md similarity index 100% rename from src/chapter-12-auth/security-features.md rename to src/12-auth/security-features.md diff --git a/src/chapter-12-auth/security-policy.md b/src/12-auth/security-policy.md similarity index 100% rename from src/chapter-12-auth/security-policy.md rename to src/12-auth/security-policy.md diff --git a/src/chapter-12-auth/user-auth.md b/src/12-auth/user-auth.md similarity index 100% rename from src/chapter-12-auth/user-auth.md rename to src/12-auth/user-auth.md diff --git a/src/chapter-12-auth/user-system-context.md b/src/12-auth/user-system-context.md similarity index 100% rename from src/chapter-12-auth/user-system-context.md rename to src/12-auth/user-system-context.md diff --git a/src/chapter-13-community/README.md b/src/13-community/README.md similarity index 100% rename from src/chapter-13-community/README.md rename to src/13-community/README.md diff --git a/src/chapter-13-community/code-of-conduct-pt-br.md b/src/13-community/code-of-conduct-pt-br.md similarity index 100% rename from src/chapter-13-community/code-of-conduct-pt-br.md rename to src/13-community/code-of-conduct-pt-br.md diff --git a/src/chapter-13-community/code-of-conduct.md b/src/13-community/code-of-conduct.md similarity index 100% rename from src/chapter-13-community/code-of-conduct.md rename to src/13-community/code-of-conduct.md diff --git a/src/chapter-13-community/community.md b/src/13-community/community.md similarity index 100% rename from src/chapter-13-community/community.md rename to src/13-community/community.md diff --git a/src/chapter-13-community/contributing-guidelines.md b/src/13-community/contributing-guidelines.md similarity index 100% rename from src/chapter-13-community/contributing-guidelines.md rename to src/13-community/contributing-guidelines.md diff --git a/src/chapter-13-community/documentation.md b/src/13-community/documentation.md similarity index 100% rename from src/chapter-13-community/documentation.md rename to src/13-community/documentation.md diff --git a/src/chapter-13-community/ide-extensions.md b/src/13-community/ide-extensions.md similarity index 100% rename from src/chapter-13-community/ide-extensions.md rename to src/13-community/ide-extensions.md diff --git a/src/chapter-13-community/pull-requests.md b/src/13-community/pull-requests.md similarity index 100% rename from src/chapter-13-community/pull-requests.md rename to src/13-community/pull-requests.md diff --git a/src/chapter-13-community/setup.md b/src/13-community/setup.md similarity index 100% rename from src/chapter-13-community/setup.md rename to src/13-community/setup.md diff --git a/src/chapter-13-community/standards.md b/src/13-community/standards.md similarity index 100% rename from src/chapter-13-community/standards.md rename to src/13-community/standards.md diff --git a/src/chapter-13-community/testing.md b/src/13-community/testing.md similarity index 100% rename from src/chapter-13-community/testing.md rename to src/13-community/testing.md diff --git a/src/chapter-14-migration/README.md b/src/14-migration/README.md similarity index 100% rename from src/chapter-14-migration/README.md rename to src/14-migration/README.md diff --git a/src/chapter-14-migration/automation.md b/src/14-migration/automation.md similarity index 100% rename from src/chapter-14-migration/automation.md rename to src/14-migration/automation.md diff --git a/src/chapter-14-migration/botpress.md b/src/14-migration/botpress.md similarity index 100% rename from src/chapter-14-migration/botpress.md rename to src/14-migration/botpress.md diff --git a/src/chapter-14-migration/common-concepts.md b/src/14-migration/common-concepts.md similarity index 100% rename from src/chapter-14-migration/common-concepts.md rename to src/14-migration/common-concepts.md diff --git a/src/chapter-14-migration/comparison-matrix.md b/src/14-migration/comparison-matrix.md similarity index 100% rename from src/chapter-14-migration/comparison-matrix.md rename to src/14-migration/comparison-matrix.md diff --git a/src/chapter-14-migration/dialogflow.md b/src/14-migration/dialogflow.md similarity index 100% rename from src/chapter-14-migration/dialogflow.md rename to src/14-migration/dialogflow.md diff --git a/src/chapter-14-migration/google-workspace.md b/src/14-migration/google-workspace.md similarity index 100% rename from src/chapter-14-migration/google-workspace.md rename to src/14-migration/google-workspace.md diff --git a/src/chapter-14-migration/intercom.md b/src/14-migration/intercom.md similarity index 100% rename from src/chapter-14-migration/intercom.md rename to src/14-migration/intercom.md diff --git a/src/chapter-14-migration/kb-migration.md b/src/14-migration/kb-migration.md similarity index 100% rename from src/chapter-14-migration/kb-migration.md rename to src/14-migration/kb-migration.md diff --git a/src/chapter-14-migration/microsoft-365.md b/src/14-migration/microsoft-365.md similarity index 100% rename from src/chapter-14-migration/microsoft-365.md rename to src/14-migration/microsoft-365.md diff --git a/src/chapter-14-migration/n8n.md b/src/14-migration/n8n.md similarity index 100% rename from src/chapter-14-migration/n8n.md rename to src/14-migration/n8n.md diff --git a/src/chapter-14-migration/notion.md b/src/14-migration/notion.md similarity index 100% rename from src/chapter-14-migration/notion.md rename to src/14-migration/notion.md diff --git a/src/chapter-14-migration/overview.md b/src/14-migration/overview.md similarity index 100% rename from src/chapter-14-migration/overview.md rename to src/14-migration/overview.md diff --git a/src/chapter-14-migration/perplexity.md b/src/14-migration/perplexity.md similarity index 100% rename from src/chapter-14-migration/perplexity.md rename to src/14-migration/perplexity.md diff --git a/src/chapter-14-migration/resources.md b/src/14-migration/resources.md similarity index 100% rename from src/chapter-14-migration/resources.md rename to src/14-migration/resources.md diff --git a/src/chapter-14-migration/validation.md b/src/14-migration/validation.md similarity index 100% rename from src/chapter-14-migration/validation.md rename to src/14-migration/validation.md diff --git a/src/chapter-14-migration/zapier-make.md b/src/14-migration/zapier-make.md similarity index 100% rename from src/chapter-14-migration/zapier-make.md rename to src/14-migration/zapier-make.md diff --git a/src/appendix-15/README.md b/src/15-appendix/README.md similarity index 100% rename from src/appendix-15/README.md rename to src/15-appendix/README.md diff --git a/src/appendix-15/relationships.md b/src/15-appendix/relationships.md similarity index 100% rename from src/appendix-15/relationships.md rename to src/15-appendix/relationships.md diff --git a/src/appendix-15/schema.md b/src/15-appendix/schema.md similarity index 100% rename from src/appendix-15/schema.md rename to src/15-appendix/schema.md diff --git a/src/appendix-15/tables.md b/src/15-appendix/tables.md similarity index 100% rename from src/appendix-15/tables.md rename to src/15-appendix/tables.md diff --git a/src/appendix-docs-style/conversation-examples.md b/src/16-appendix-docs-style/conversation-examples.md similarity index 100% rename from src/appendix-docs-style/conversation-examples.md rename to src/16-appendix-docs-style/conversation-examples.md diff --git a/src/appendix-docs-style/svg.md b/src/16-appendix-docs-style/svg.md similarity index 100% rename from src/appendix-docs-style/svg.md rename to src/16-appendix-docs-style/svg.md diff --git a/src/appendix-external-services/README.md b/src/18-appendix-external-services/README.md similarity index 100% rename from src/appendix-external-services/README.md rename to src/18-appendix-external-services/README.md diff --git a/src/appendix-external-services/attendance-queue.md b/src/18-appendix-external-services/attendance-queue.md similarity index 100% rename from src/appendix-external-services/attendance-queue.md rename to src/18-appendix-external-services/attendance-queue.md diff --git a/src/appendix-external-services/catalog.md b/src/18-appendix-external-services/catalog.md similarity index 100% rename from src/appendix-external-services/catalog.md rename to src/18-appendix-external-services/catalog.md diff --git a/src/appendix-external-services/channels.md b/src/18-appendix-external-services/channels.md similarity index 100% rename from src/appendix-external-services/channels.md rename to src/18-appendix-external-services/channels.md diff --git a/src/appendix-external-services/console.md b/src/18-appendix-external-services/console.md similarity index 100% rename from src/appendix-external-services/console.md rename to src/18-appendix-external-services/console.md diff --git a/src/appendix-external-services/directory.md b/src/18-appendix-external-services/directory.md similarity index 100% rename from src/appendix-external-services/directory.md rename to src/18-appendix-external-services/directory.md diff --git a/src/appendix-external-services/hosting-dns.md b/src/18-appendix-external-services/hosting-dns.md similarity index 100% rename from src/appendix-external-services/hosting-dns.md rename to src/18-appendix-external-services/hosting-dns.md diff --git a/src/appendix-external-services/llm-providers.md b/src/18-appendix-external-services/llm-providers.md similarity index 100% rename from src/appendix-external-services/llm-providers.md rename to src/18-appendix-external-services/llm-providers.md diff --git a/src/appendix-external-services/multimodal.md b/src/18-appendix-external-services/multimodal.md similarity index 100% rename from src/appendix-external-services/multimodal.md rename to src/18-appendix-external-services/multimodal.md diff --git a/src/appendix-external-services/nvidia.md b/src/18-appendix-external-services/nvidia.md similarity index 100% rename from src/appendix-external-services/nvidia.md rename to src/18-appendix-external-services/nvidia.md diff --git a/src/appendix-external-services/storage.md b/src/18-appendix-external-services/storage.md similarity index 100% rename from src/appendix-external-services/storage.md rename to src/18-appendix-external-services/storage.md diff --git a/src/appendix-external-services/timeseries.md b/src/18-appendix-external-services/timeseries.md similarity index 100% rename from src/appendix-external-services/timeseries.md rename to src/18-appendix-external-services/timeseries.md diff --git a/src/appendix-external-services/weather.md b/src/18-appendix-external-services/weather.md similarity index 100% rename from src/appendix-external-services/weather.md rename to src/18-appendix-external-services/weather.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index d11b0597..a17e9147 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -5,373 +5,372 @@ # Part I - Getting Started -- [Chapter 01: Run and Talk](./chapter-01/README.md) - - [Overview](./chapter-01/overview.md) - - [Quick Start](./chapter-01/quick-start.md) - - [Installation](./chapter-01/installation.md) - - [First Conversation](./chapter-01/first-conversation.md) - - [Sessions and Channels](./chapter-01/sessions.md) +- [Chapter 01: Run and Talk](./01-introduction/README.md) + - [Overview](./01-introduction/overview.md) + - [Quick Start](./01-introduction/quick-start.md) + - [Installation](./01-introduction/installation.md) + - [First Conversation](./01-introduction/first-conversation.md) + - [Sessions and Channels](./01-introduction/sessions.md) # Part II - Package System -- [Chapter 02: About Packages](./chapter-02/README.md) - - [.gbai Architecture](./chapter-02/gbai.md) - - [.gbdialog Dialogs](./chapter-02/gbdialog.md) - - [.gbkb Knowledge Base](./chapter-02/gbkb.md) - - [.gbot Bot Configuration](./chapter-02/gbot.md) - - [.gbtheme UI Theming](./chapter-02/gbtheme.md) - - [.gbdrive File Storage](./chapter-02/gbdrive.md) - - [Bot Templates](./chapter-02/templates.md) - - [Template Samples & Conversations](./chapter-02/template-samples.md) - - [Template: Business Intelligence](./chapter-02/template-bi.md) - - [Template: Web Crawler](./chapter-02/template-crawler.md) - - [Template: Legal Documents](./chapter-02/template-law.md) - - [Template: LLM Server](./chapter-02/template-llm-server.md) - - [Template: LLM Tools](./chapter-02/template-llm-tools.md) - - [Template: API Client](./chapter-02/template-api-client.md) - - [Template: Platform Analytics](./chapter-02/template-analytics.md) - - [Template: Office Automation](./chapter-02/template-office.md) - - [Template: Reminders](./chapter-02/template-reminder.md) - - [Template: Sales CRM](./chapter-02/template-crm.md) - - [Template: CRM Contacts](./chapter-02/template-crm-contacts.md) - - [Template: Attendance CRM](./chapter-02/template-attendance-crm.md) - - [Template: Marketing](./chapter-02/template-marketing.md) - - [Template: Creating Templates](./chapter-02/template-template.md) +- [Chapter 02: About Packages](./02-templates/README.md) + - [.gbai Architecture](./02-templates/gbai.md) + - [.gbdialog Dialogs](./02-templates/gbdialog.md) + - [.gbkb Knowledge Base](./02-templates/gbkb.md) + - [.gbot Bot Configuration](./02-templates/gbot.md) + - [.gbtheme UI Theming](./02-templates/gbtheme.md) + - [.gbdrive File Storage](./02-templates/gbdrive.md) + - [Bot Templates](./02-templates/templates.md) + - [Template Samples & Conversations](./02-templates/template-samples.md) + - [Template: Business Intelligence](./02-templates/template-bi.md) + - [Template: Web Crawler](./02-templates/template-crawler.md) + - [Template: Legal Documents](./02-templates/template-law.md) + - [Template: LLM Server](./02-templates/template-llm-server.md) + - [Template: LLM Tools](./02-templates/template-llm-tools.md) + - [Template: API Client](./02-templates/template-api-client.md) + - [Template: Platform Analytics](./02-templates/template-analytics.md) + - [Template: Office Automation](./02-templates/template-office.md) + - [Template: Reminders](./02-templates/template-reminder.md) + - [Template: Sales CRM](./02-templates/template-crm.md) + - [Template: CRM Contacts](./02-templates/template-crm-contacts.md) + - [Template: Attendance CRM](./02-templates/template-attendance-crm.md) + - [Template: Marketing](./02-templates/template-marketing.md) + - [Template: Creating Templates](./02-templates/template-template.md) # Part III - Knowledge Base -- [Chapter 03: gbkb Reference](./chapter-03/README.md) - - [KB and Tools System](./chapter-03/kb-and-tools.md) - - [Vector Collections](./chapter-03/vector-collections.md) - - [Document Indexing](./chapter-03/indexing.md) - - [Semantic Search](./chapter-03/semantic-search.md) - - [Episodic Memory](./chapter-03/episodic-memory.md) - - [Semantic Caching](./chapter-03/caching.md) +- [Chapter 03: gbkb Reference](./03-knowledge-base/README.md) + - [KB and Tools System](./03-knowledge-base/kb-and-tools.md) + - [Vector Collections](./03-knowledge-base/vector-collections.md) + - [Document Indexing](./03-knowledge-base/indexing.md) + - [Semantic Search](./03-knowledge-base/semantic-search.md) + - [Episodic Memory](./03-knowledge-base/episodic-memory.md) + - [Semantic Caching](./03-knowledge-base/caching.md) # Part IV - User Interface -- [Chapter 04: .gbui Interface Reference](./chapter-04-gbui/README.md) - - [Suite User Manual](./chapter-04-gbui/suite-manual.md) - - [Admin vs User Views](./chapter-04-gbui/admin-user-views.md) - - [UI Structure](./chapter-04-gbui/ui-structure.md) - - [single.gbui - Simple Chat](./chapter-04-gbui/single-gbui.md) - - [Console Mode](./chapter-04-gbui/console-mode.md) - - [Monitoring Dashboard](./chapter-04-gbui/monitoring.md) - - [HTMX Architecture](./chapter-04-gbui/htmx-architecture.md) - - [Suite Applications](./chapter-04-gbui/apps/README.md) - - [Suite - Full Desktop](./chapter-04-gbui/apps/suite.md) - - [Chat - AI Assistant](./chapter-04-gbui/apps/chat.md) - - [Drive - File Management](./chapter-04-gbui/apps/drive.md) - - [Tasks - To-Do Lists](./chapter-04-gbui/apps/tasks.md) - - [Mail - Email Client](./chapter-04-gbui/apps/mail.md) - - [Calendar - Scheduling](./chapter-04-gbui/apps/calendar.md) - - [Meet - Video Calls](./chapter-04-gbui/apps/meet.md) - - [Player - Media Viewer](./chapter-04-gbui/apps/player.md) - - [Paper - AI Writing](./chapter-04-gbui/apps/paper.md) - - [Research - AI Search](./chapter-04-gbui/apps/research.md) - - [Analytics - Dashboards](./chapter-04-gbui/apps/analytics.md) - - [Designer - Visual Builder](./chapter-04-gbui/apps/designer.md) - - [Sources - Prompts & Templates](./chapter-04-gbui/apps/sources.md) - - [Compliance - Security Scanner](./chapter-04-gbui/apps/compliance.md) - - [Compliance API Reference](./chapter-04-gbui/apps/compliance-api.md) - - [How-To Tutorials](./chapter-04-gbui/how-to/README.md) - - [Create Your First Bot](./chapter-04-gbui/how-to/create-first-bot.md) - - [Write Your First Dialog](./chapter-04-gbui/how-to/write-first-dialog.md) - - [Add Documents to Knowledge Base](./chapter-04-gbui/how-to/add-kb-documents.md) - - [Connect WhatsApp](./chapter-04-gbui/how-to/connect-whatsapp.md) - - [Monitor Your Bot](./chapter-04-gbui/how-to/monitor-sessions.md) +- [Chapter 04: .gbui Interface Reference](./04-gbui/README.md) + - [Suite User Manual](./04-gbui/suite-manual.md) + - [Admin vs User Views](./04-gbui/admin-user-views.md) + - [UI Structure](./04-gbui/ui-structure.md) + - [single.gbui - Simple Chat](./04-gbui/single-gbui.md) + - [Console Mode](./04-gbui/console-mode.md) + - [Monitoring Dashboard](./04-gbui/monitoring.md) + - [HTMX Architecture](./04-gbui/htmx-architecture.md) + - [Suite Applications](./04-gbui/apps/README.md) + - [Suite - Full Desktop](./04-gbui/apps/suite.md) + - [Chat - AI Assistant](./04-gbui/apps/chat.md) + - [Drive - File Management](./04-gbui/apps/drive.md) + - [Tasks - To-Do Lists](./04-gbui/apps/tasks.md) + - [Mail - Email Client](./04-gbui/apps/mail.md) + - [Calendar - Scheduling](./04-gbui/apps/calendar.md) + - [Meet - Video Calls](./04-gbui/apps/meet.md) + - [Player - Media Viewer](./04-gbui/apps/player.md) + - [Paper - AI Writing](./04-gbui/apps/paper.md) + - [Research - AI Search](./04-gbui/apps/research.md) + - [Analytics - Dashboards](./04-gbui/apps/analytics.md) + - [Designer - Visual Builder](./04-gbui/apps/designer.md) + - [Sources - Prompts & Templates](./04-gbui/apps/sources.md) + - [Compliance - Security Scanner](./04-gbui/apps/compliance.md) + - [Compliance API Reference](./04-gbui/apps/compliance-api.md) + - [How-To Tutorials](./04-gbui/how-to/README.md) + - [Create Your First Bot](./04-gbui/how-to/create-first-bot.md) + - [Write Your First Dialog](./04-gbui/how-to/write-first-dialog.md) + - [Add Documents to Knowledge Base](./04-gbui/how-to/add-kb-documents.md) + - [Connect WhatsApp](./04-gbui/how-to/connect-whatsapp.md) + - [Monitor Your Bot](./04-gbui/how-to/monitor-sessions.md) # Part V - Themes and Styling -- [Chapter 05: gbtheme CSS Reference](./chapter-05-gbtheme/README.md) - - [Theme Structure](./chapter-05-gbtheme/structure.md) - - [CSS Customization](./chapter-05-gbtheme/css.md) +- [Chapter 05: gbtheme CSS Reference](./05-gbtheme/README.md) + - [Theme Structure](./05-gbtheme/structure.md) + - [CSS Customization](./05-gbtheme/css.md) # Part VI - BASIC Dialogs -- [Chapter 06: gbdialog Reference](./chapter-06-gbdialog/README.md) - - [Dialog Basics](./chapter-06-gbdialog/basics.md) - - [Universal Messaging & Multi-Channel](./chapter-06-gbdialog/universal-messaging.md) - - [BASIC vs n8n/Zapier/Make](./chapter-06-gbdialog/basic-vs-automation-tools.md) - - [Template Variables](./chapter-06-gbdialog/template-variables.md) - - [Template Examples](./chapter-06-gbdialog/templates.md) - - [start.bas](./chapter-06-gbdialog/templates/start.md) - - [enrollment.bas](./chapter-06-gbdialog/templates/enrollment.md) - - [auth.bas](./chapter-06-gbdialog/templates/auth.md) - - [ai-search.bas](./chapter-06-gbdialog/templates/ai-search.md) - - [analytics-dashboard.bas](./chapter-06-gbdialog/templates/analytics-dashboard.md) - - [announcements.bas](./chapter-06-gbdialog/templates/announcements.md) - - [backup.bas](./chapter-06-gbdialog/templates/backup.md) - - [bank.bas](./chapter-06-gbdialog/templates/bank.md) - - [broadcast.bas](./chapter-06-gbdialog/templates/broadcast.md) - - [default.bas](./chapter-06-gbdialog/templates/default.md) - - [edu.bas](./chapter-06-gbdialog/templates/edu.md) - - [employees.bas](./chapter-06-gbdialog/templates/employees.md) - - [erp.bas](./chapter-06-gbdialog/templates/erp.md) - - [helpdesk.bas](./chapter-06-gbdialog/templates/helpdesk.md) - - [privacy.bas](./chapter-06-gbdialog/templates/privacy.md) - - [sales-pipeline.bas](./chapter-06-gbdialog/templates/sales-pipeline.md) - - [store.bas](./chapter-06-gbdialog/templates/store.md) - - [talk-to-data.bas](./chapter-06-gbdialog/templates/talk-to-data.md) - - [whatsapp.bas](./chapter-06-gbdialog/templates/whatsapp.md) - - [Webhook Integrations and Jobs](./chapter-06-gbdialog/examples-consolidated.md) - - [Data Sync Tools](./chapter-06-gbdialog/tools-data-sync.md) - - [Keywords Reference](./chapter-06-gbdialog/keywords.md) - - [TALK](./chapter-06-gbdialog/keyword-talk.md) - - [HEAR](./chapter-06-gbdialog/keyword-hear.md) - - [SET CONTEXT](./chapter-06-gbdialog/keyword-set-context.md) - - [GET BOT MEMORY](./chapter-06-gbdialog/keyword-get-bot-memory.md) - - [SET BOT MEMORY](./chapter-06-gbdialog/keyword-set-bot-memory.md) - - [GET USER MEMORY](./chapter-06-gbdialog/keyword-get-user-memory.md) - - [SET USER MEMORY](./chapter-06-gbdialog/keyword-set-user-memory.md) - - [REMEMBER / RECALL](./chapter-06-gbdialog/keyword-remember.md) - - [BOOK / BOOK_MEETING](./chapter-06-gbdialog/keyword-book.md) - - [WEATHER / FORECAST](./chapter-06-gbdialog/keyword-weather.md) - - [ADD BOT](./chapter-06-gbdialog/keyword-add-bot.md) - - [ADD MEMBER](./chapter-06-gbdialog/keyword-add-member.md) - - [ADD SUGGESTION](./chapter-06-gbdialog/keyword-add-suggestion.md) - - [MODEL ROUTE](./chapter-06-gbdialog/keyword-model-route.md) - - [SEND TEMPLATE](./chapter-06-gbdialog/keyword-send-template.md) - - [SET USER](./chapter-06-gbdialog/keyword-set-user.md) - - [USE MODEL](./chapter-06-gbdialog/keyword-use-model.md) - - [DELEGATE TO BOT](./chapter-06-gbdialog/keyword-delegate-to-bot.md) - - [BOT REFLECTION](./chapter-06-gbdialog/keyword-bot-reflection.md) - - [RUN PYTHON / JAVASCRIPT / BASH](./chapter-06-gbdialog/keyword-run-code.md) - - [USE KB](./chapter-06-gbdialog/keyword-use-kb.md) - - [CLEAR KB](./chapter-06-gbdialog/keyword-clear-kb.md) - - [USE WEBSITE](./chapter-06-gbdialog/keyword-use-website.md) - - [USE TOOL](./chapter-06-gbdialog/keyword-use-tool.md) - - [CLEAR TOOLS](./chapter-06-gbdialog/keyword-clear-tools.md) - - [GET](./chapter-06-gbdialog/keyword-get.md) - - [SET](./chapter-06-gbdialog/keyword-set.md) - - [ON](./chapter-06-gbdialog/keyword-on.md) - - [SET SCHEDULE](./chapter-06-gbdialog/keyword-set-schedule.md) - - [CREATE SITE](./chapter-06-gbdialog/keyword-create-site.md) - - [CREATE DRAFT](./chapter-06-gbdialog/keyword-create-draft.md) - - [CREATE TASK](./chapter-06-gbdialog/keyword-create-task.md) - - [PRINT](./chapter-06-gbdialog/keyword-print.md) - - [WAIT](./chapter-06-gbdialog/keyword-wait.md) - - [FORMAT](./chapter-06-gbdialog/keyword-format.md) - - [FIRST](./chapter-06-gbdialog/keyword-first.md) - - [LAST](./chapter-06-gbdialog/keyword-last.md) - - [FOR EACH](./chapter-06-gbdialog/keyword-for-each.md) - - [EXIT FOR](./chapter-06-gbdialog/keyword-exit-for.md) - - [SEND MAIL](./chapter-06-gbdialog/keyword-send-mail.md) - - [FIND](./chapter-06-gbdialog/keyword-find.md) - - [INSTR](./chapter-06-gbdialog/keyword-instr.md) - - [IS NUMERIC](./chapter-06-gbdialog/keyword-is-numeric.md) - - [SWITCH](./chapter-06-gbdialog/keyword-switch.md) - - [WEBHOOK](./chapter-06-gbdialog/keyword-webhook.md) - - [TABLE](./chapter-06-gbdialog/keyword-table.md) - - [KB Statistics Keywords](./chapter-06-gbdialog/keywords-kb-statistics.md) - - [KB STATISTICS](./chapter-06-gbdialog/keyword-kb-statistics.md) - - [KB COLLECTION STATS](./chapter-06-gbdialog/keyword-kb-collection-stats.md) - - [KB DOCUMENTS COUNT](./chapter-06-gbdialog/keyword-kb-documents-count.md) - - [KB DOCUMENTS ADDED SINCE](./chapter-06-gbdialog/keyword-kb-documents-added-since.md) - - [KB LIST COLLECTIONS](./chapter-06-gbdialog/keyword-kb-list-collections.md) - - [KB STORAGE SIZE](./chapter-06-gbdialog/keyword-kb-storage-size.md) - - [Multi-Agent Keywords](./chapter-06-gbdialog/keywords-multi-agent.md) - - [Social Media Keywords](./chapter-06-gbdialog/keywords-social-media.md) - - [Lead Scoring Keywords](./chapter-06-gbdialog/keywords-lead-scoring.md) - - [HTTP & API Operations](./chapter-06-gbdialog/keywords-http.md) - - [POST](./chapter-06-gbdialog/keyword-post.md) - - [PUT](./chapter-06-gbdialog/keyword-put.md) - - [PATCH](./chapter-06-gbdialog/keyword-patch.md) - - [DELETE HTTP](./chapter-06-gbdialog/keyword-delete-http.md) - - [SET HEADER](./chapter-06-gbdialog/keyword-set-header.md) - - [GRAPHQL](./chapter-06-gbdialog/keyword-graphql.md) - - [SOAP](./chapter-06-gbdialog/keyword-soap.md) - - [Data Operations](./chapter-06-gbdialog/keywords-data.md) - - [SAVE](./chapter-06-gbdialog/keyword-save.md) - - [INSERT](./chapter-06-gbdialog/keyword-insert.md) - - [UPDATE](./chapter-06-gbdialog/keyword-update.md) - - [DELETE](./chapter-06-gbdialog/keyword-delete.md) - - [MERGE](./chapter-06-gbdialog/keyword-merge.md) - - [FILL](./chapter-06-gbdialog/keyword-fill.md) - - [MAP](./chapter-06-gbdialog/keyword-map.md) - - [FILTER](./chapter-06-gbdialog/keyword-filter.md) - - [AGGREGATE](./chapter-06-gbdialog/keyword-aggregate.md) - - [JOIN](./chapter-06-gbdialog/keyword-join.md) - - [PIVOT](./chapter-06-gbdialog/keyword-pivot.md) - - [GROUP BY](./chapter-06-gbdialog/keyword-group-by.md) - - [Media & Messaging](./chapter-06-gbdialog/keywords-media.md) - - [PLAY](./chapter-06-gbdialog/keyword-play.md) - - [QR CODE](./chapter-06-gbdialog/keyword-qrcode.md) - - [SEND SMS](./chapter-06-gbdialog/keyword-sms.md) - - [START MEET / JOIN MEET](./chapter-06-gbdialog/keyword-start-meet.md) - - [File Operations](./chapter-06-gbdialog/keywords-file.md) - - [READ](./chapter-06-gbdialog/keyword-read.md) - - [WRITE](./chapter-06-gbdialog/keyword-write.md) - - [DELETE FILE](./chapter-06-gbdialog/keyword-delete-file.md) - - [COPY](./chapter-06-gbdialog/keyword-copy.md) - - [MOVE](./chapter-06-gbdialog/keyword-move.md) - - [LIST](./chapter-06-gbdialog/keyword-list.md) - - [COMPRESS](./chapter-06-gbdialog/keyword-compress.md) - - [EXTRACT](./chapter-06-gbdialog/keyword-extract.md) - - [UPLOAD](./chapter-06-gbdialog/keyword-upload.md) - - [DOWNLOAD](./chapter-06-gbdialog/keyword-download.md) - - [GENERATE PDF](./chapter-06-gbdialog/keyword-generate-pdf.md) - - [MERGE PDF](./chapter-06-gbdialog/keyword-merge-pdf.md) +- [Chapter 06: gbdialog Reference](./06-gbdialog/README.md) + - [Dialog Basics](./06-gbdialog/basics.md) + - [Universal Messaging & Multi-Channel](./06-gbdialog/universal-messaging.md) + - [BASIC vs n8n/Zapier/Make](./06-gbdialog/basic-vs-automation-tools.md) + - [Template Variables](./06-gbdialog/template-variables.md) + - [Template Examples](./06-gbdialog/templates.md) + - [start.bas](./06-gbdialog/templates/start.md) + - [enrollment.bas](./06-gbdialog/templates/enrollment.md) + - [auth.bas](./06-gbdialog/templates/auth.md) + - [ai-search.bas](./06-gbdialog/templates/ai-search.md) + - [analytics-dashboard.bas](./06-gbdialog/templates/analytics-dashboard.md) + - [announcements.bas](./06-gbdialog/templates/announcements.md) + - [backup.bas](./06-gbdialog/templates/backup.md) + - [bank.bas](./06-gbdialog/templates/bank.md) + - [broadcast.bas](./06-gbdialog/templates/broadcast.md) + - [default.bas](./06-gbdialog/templates/default.md) + - [edu.bas](./06-gbdialog/templates/edu.md) + - [employees.bas](./06-gbdialog/templates/employees.md) + - [erp.bas](./06-gbdialog/templates/erp.md) + - [helpdesk.bas](./06-gbdialog/templates/helpdesk.md) + - [privacy.bas](./06-gbdialog/templates/privacy.md) + - [sales-pipeline.bas](./06-gbdialog/templates/sales-pipeline.md) + - [store.bas](./06-gbdialog/templates/store.md) + - [talk-to-data.bas](./06-gbdialog/templates/talk-to-data.md) + - [whatsapp.bas](./06-gbdialog/templates/whatsapp.md) + - [Webhook Integrations and Jobs](./06-gbdialog/examples-consolidated.md) + - [Data Sync Tools](./06-gbdialog/tools-data-sync.md) + - [Keywords Reference](./06-gbdialog/keywords.md) + - [TALK](./06-gbdialog/keyword-talk.md) + - [HEAR](./06-gbdialog/keyword-hear.md) + - [SET CONTEXT](./06-gbdialog/keyword-set-context.md) + - [GET BOT MEMORY](./06-gbdialog/keyword-get-bot-memory.md) + - [SET BOT MEMORY](./06-gbdialog/keyword-set-bot-memory.md) + - [GET USER MEMORY](./06-gbdialog/keyword-get-user-memory.md) + - [SET USER MEMORY](./06-gbdialog/keyword-set-user-memory.md) + - [REMEMBER / RECALL](./06-gbdialog/keyword-remember.md) + - [BOOK / BOOK_MEETING](./06-gbdialog/keyword-book.md) + - [WEATHER / FORECAST](./06-gbdialog/keyword-weather.md) + - [ADD BOT](./06-gbdialog/keyword-add-bot.md) + - [ADD MEMBER](./06-gbdialog/keyword-add-member.md) + - [ADD SUGGESTION](./06-gbdialog/keyword-add-suggestion.md) + - [MODEL ROUTE](./06-gbdialog/keyword-model-route.md) + - [SEND TEMPLATE](./06-gbdialog/keyword-send-template.md) + - [SET USER](./06-gbdialog/keyword-set-user.md) + - [USE MODEL](./06-gbdialog/keyword-use-model.md) + - [DELEGATE TO BOT](./06-gbdialog/keyword-delegate-to-bot.md) + - [BOT REFLECTION](./06-gbdialog/keyword-bot-reflection.md) + - [RUN PYTHON / JAVASCRIPT / BASH](./06-gbdialog/keyword-run-code.md) + - [USE KB](./06-gbdialog/keyword-use-kb.md) + - [CLEAR KB](./06-gbdialog/keyword-clear-kb.md) + - [USE WEBSITE](./06-gbdialog/keyword-use-website.md) + - [USE TOOL](./06-gbdialog/keyword-use-tool.md) + - [CLEAR TOOLS](./06-gbdialog/keyword-clear-tools.md) + - [GET](./06-gbdialog/keyword-get.md) + - [SET](./06-gbdialog/keyword-set.md) + - [ON](./06-gbdialog/keyword-on.md) + - [SET SCHEDULE](./06-gbdialog/keyword-set-schedule.md) + - [CREATE SITE](./06-gbdialog/keyword-create-site.md) + - [CREATE DRAFT](./06-gbdialog/keyword-create-draft.md) + - [CREATE TASK](./06-gbdialog/keyword-create-task.md) + - [PRINT](./06-gbdialog/keyword-print.md) + - [WAIT](./06-gbdialog/keyword-wait.md) + - [FORMAT](./06-gbdialog/keyword-format.md) + - [FIRST](./06-gbdialog/keyword-first.md) + - [LAST](./06-gbdialog/keyword-last.md) + - [FOR EACH](./06-gbdialog/keyword-for-each.md) + - [EXIT FOR](./06-gbdialog/keyword-exit-for.md) + - [SEND MAIL](./06-gbdialog/keyword-send-mail.md) + - [FIND](./06-gbdialog/keyword-find.md) + - [INSTR](./06-gbdialog/keyword-instr.md) + - [IS NUMERIC](./06-gbdialog/keyword-is-numeric.md) + - [SWITCH](./06-gbdialog/keyword-switch.md) + - [WEBHOOK](./06-gbdialog/keyword-webhook.md) + - [TABLE](./06-gbdialog/keyword-table.md) + - [KB Statistics Keywords](./06-gbdialog/keywords-kb-statistics.md) + - [KB STATISTICS](./06-gbdialog/keyword-kb-statistics.md) + - [KB COLLECTION STATS](./06-gbdialog/keyword-kb-collection-stats.md) + - [KB DOCUMENTS COUNT](./06-gbdialog/keyword-kb-documents-count.md) + - [KB DOCUMENTS ADDED SINCE](./06-gbdialog/keyword-kb-documents-added-since.md) + - [KB LIST COLLECTIONS](./06-gbdialog/keyword-kb-list-collections.md) + - [KB STORAGE SIZE](./06-gbdialog/keyword-kb-storage-size.md) + - [Multi-Agent Keywords](./06-gbdialog/keywords-multi-agent.md) + - [Social Media Keywords](./06-gbdialog/keywords-social-media.md) + - [Lead Scoring Keywords](./06-gbdialog/keywords-lead-scoring.md) + - [HTTP & API Operations](./06-gbdialog/keywords-http.md) + - [POST](./06-gbdialog/keyword-post.md) + - [PUT](./06-gbdialog/keyword-put.md) + - [PATCH](./06-gbdialog/keyword-patch.md) + - [DELETE HTTP](./06-gbdialog/keyword-delete-http.md) + - [SET HEADER](./06-gbdialog/keyword-set-header.md) + - [GRAPHQL](./06-gbdialog/keyword-graphql.md) + - [SOAP](./06-gbdialog/keyword-soap.md) + - [Data Operations](./06-gbdialog/keywords-data.md) + - [SAVE](./06-gbdialog/keyword-save.md) + - [INSERT](./06-gbdialog/keyword-insert.md) + - [UPDATE](./06-gbdialog/keyword-update.md) + - [DELETE](./06-gbdialog/keyword-delete.md) + - [MERGE](./06-gbdialog/keyword-merge.md) + - [FILL](./06-gbdialog/keyword-fill.md) + - [MAP](./06-gbdialog/keyword-map.md) + - [FILTER](./06-gbdialog/keyword-filter.md) + - [AGGREGATE](./06-gbdialog/keyword-aggregate.md) + - [JOIN](./06-gbdialog/keyword-join.md) + - [PIVOT](./06-gbdialog/keyword-pivot.md) + - [GROUP BY](./06-gbdialog/keyword-group-by.md) + - [Media & Messaging](./06-gbdialog/keywords-media.md) + - [PLAY](./06-gbdialog/keyword-play.md) + - [QR CODE](./06-gbdialog/keyword-qrcode.md) + - [SEND SMS](./06-gbdialog/keyword-sms.md) + - [START MEET / JOIN MEET](./06-gbdialog/keyword-start-meet.md) + - [File Operations](./06-gbdialog/keywords-file.md) + - [READ](./06-gbdialog/keyword-read.md) + - [WRITE](./06-gbdialog/keyword-write.md) + - [DELETE FILE](./06-gbdialog/keyword-delete-file.md) + - [COPY](./06-gbdialog/keyword-copy.md) + - [MOVE](./06-gbdialog/keyword-move.md) + - [LIST](./06-gbdialog/keyword-list.md) + - [COMPRESS](./06-gbdialog/keyword-compress.md) + - [EXTRACT](./06-gbdialog/keyword-extract.md) + - [UPLOAD](./06-gbdialog/keyword-upload.md) + - [DOWNLOAD](./06-gbdialog/keyword-download.md) + - [GENERATE PDF](./06-gbdialog/keyword-generate-pdf.md) + - [MERGE PDF](./06-gbdialog/keyword-merge-pdf.md) # Part VII - Extending General Bots -- [Chapter 07: gbapp Architecture Reference](./chapter-07-gbapp/README.md) - - [Architecture Overview](./chapter-07-gbapp/architecture.md) - - [Building from Source](./chapter-07-gbapp/building.md) - - [Container Deployment (LXC)](./chapter-07-gbapp/containers.md) - - [Docker Deployment](./chapter-07-gbapp/docker-deployment.md) - - [Scaling and Load Balancing](./chapter-07-gbapp/scaling.md) - - [Infrastructure Design](./chapter-07-gbapp/infrastructure.md) - - [Observability](./chapter-07-gbapp/observability.md) - - [Philosophy](./chapter-07-gbapp/philosophy.md) - - [Example gbapp](./chapter-07-gbapp/example-gbapp.md) - - [Module Structure](./chapter-07-gbapp/crates.md) - - [Service Layer](./chapter-07-gbapp/services.md) - - [Creating Custom Keywords](./chapter-07-gbapp/custom-keywords.md) - - [Adding Dependencies](./chapter-07-gbapp/dependencies.md) +- [Chapter 07: gbapp Architecture Reference](./07-gbapp/README.md) + - [Architecture Overview](./07-gbapp/architecture.md) + - [Building from Source](./07-gbapp/building.md) + - [Container Deployment (LXC)](./07-gbapp/containers.md) + - [Docker Deployment](./07-gbapp/docker-deployment.md) + - [Scaling and Load Balancing](./07-gbapp/scaling.md) + - [Infrastructure Design](./07-gbapp/infrastructure.md) + - [Observability](./07-gbapp/observability.md) + - [Philosophy](./07-gbapp/philosophy.md) + - [Example gbapp](./07-gbapp/example-gbapp.md) + - [Module Structure](./07-gbapp/crates.md) + - [Service Layer](./07-gbapp/services.md) + - [Creating Custom Keywords](./07-gbapp/custom-keywords.md) + - [Adding Dependencies](./07-gbapp/dependencies.md) # Part VIII - Bot Configuration -- [Chapter 08: gbot Reference](./chapter-08-config/README.md) - - [config.csv Format](./chapter-08-config/config-csv.md) - - [Bot Parameters](./chapter-08-config/parameters.md) - - [LLM Configuration](./chapter-08-config/llm-config.md) - - [Context Configuration](./chapter-08-config/context-config.md) - - [Drive Integration](./chapter-08-config/drive.md) - - [Multimodal Configuration](./chapter-08-config/multimodal.md) - - [Secrets Management](./chapter-08-config/secrets-management.md) +- [Chapter 08: gbot Reference](./08-config/README.md) + - [config.csv Format](./08-config/config-csv.md) + - [Bot Parameters](./08-config/parameters.md) + - [LLM Configuration](./08-config/llm-config.md) + - [Context Configuration](./08-config/context-config.md) + - [Drive Integration](./08-config/drive.md) + - [Multimodal Configuration](./08-config/multimodal.md) + - [Secrets Management](./08-config/secrets-management.md) # Part IX - Tools and Integration -- [Chapter 09: LLM Tools](./chapter-09-tools/README.md) - - [Tool Definition](./chapter-09-tools/tool-definition.md) - - [PARAM Declaration](./chapter-09-tools/param-declaration.md) - - [Tool Compilation](./chapter-09-tools/compilation.md) - - [MCP Format](./chapter-09-tools/mcp-format.md) - - [Tool Format](./chapter-09-tools/openai-format.md) - - [GET Keyword Integration](./chapter-09-tools/get-integration.md) - - [External APIs](./chapter-09-tools/external-apis.md) - - [LLM REST Server](./chapter-09-tools/llm-rest-server.md) - - [NVIDIA GPU Setup for LXC](./chapter-09-tools/nvidia-gpu-setup.md) +- [Chapter 09: LLM Tools](./09-tools/README.md) + - [Tool Definition](./09-tools/tool-definition.md) + - [PARAM Declaration](./09-tools/param-declaration.md) + - [Tool Compilation](./09-tools/compilation.md) + - [MCP Format](./09-tools/mcp-format.md) + - [Tool Format](./09-tools/openai-format.md) + - [GET Keyword Integration](./09-tools/get-integration.md) + - [External APIs](./09-tools/external-apis.md) + - [LLM REST Server](./09-tools/llm-rest-server.md) + - [NVIDIA GPU Setup for LXC](./09-tools/nvidia-gpu-setup.md) -- [Chapter 10: REST Endpoints](./chapter-10-rest/README.md) - - [Files API](./chapter-10-rest/files-api.md) - - [Document Processing API](./chapter-10-rest/document-processing.md) - - [Users API](./chapter-10-rest/users-api.md) - - [User Security API](./chapter-10-rest/user-security.md) - - [Groups API](./chapter-10-rest/groups-api.md) - - [Group Membership API](./chapter-10-rest/group-membership.md) - - [Conversations API](./chapter-10-rest/conversations-api.md) - - [Calls API](./chapter-10-rest/calls-api.md) - - [Whiteboard API](./chapter-10-rest/whiteboard-api.md) - - [Email API](./chapter-10-rest/email-api.md) - - [Notifications API](./chapter-10-rest/notifications-api.md) - - [Calendar API](./chapter-10-rest/calendar-api.md) - - [Tasks API](./chapter-10-rest/tasks-api.md) - - [Storage API](./chapter-10-rest/storage-api.md) - - [Backup API](./chapter-10-rest/backup-api.md) - - [Analytics API](./chapter-10-rest/analytics-api.md) - - [Reports API](./chapter-10-rest/reports-api.md) - - [Admin API](./chapter-10-rest/admin-api.md) - - [Monitoring API](./chapter-10-rest/monitoring-api.md) - - [AI API](./chapter-10-rest/ai-api.md) - - [ML API](./chapter-10-rest/ml-api.md) - - [Security API](./chapter-10-rest/security-api.md) - - [Compliance API](./chapter-10-rest/compliance-api.md) - - [Example Integrations](./chapter-10-rest/examples.md) +- [Chapter 10: REST Endpoints](./10-rest/README.md) + - [Files API](./10-rest/files-api.md) + - [Document Processing API](./10-rest/document-processing.md) + - [Users API](./10-rest/users-api.md) + - [User Security API](./10-rest/user-security.md) + - [Groups API](./10-rest/groups-api.md) + - [Group Membership API](./10-rest/group-membership.md) + - [Conversations API](./10-rest/conversations-api.md) + - [Calls API](./10-rest/calls-api.md) + - [Whiteboard API](./10-rest/whiteboard-api.md) + - [Email API](./10-rest/email-api.md) + - [Notifications API](./10-rest/notifications-api.md) + - [Calendar API](./10-rest/calendar-api.md) + - [Tasks API](./10-rest/tasks-api.md) + - [Storage API](./10-rest/storage-api.md) + - [Backup API](./10-rest/backup-api.md) + - [Analytics API](./10-rest/analytics-api.md) + - [Reports API](./10-rest/reports-api.md) + - [Admin API](./10-rest/admin-api.md) + - [Monitoring API](./10-rest/monitoring-api.md) + - [AI API](./10-rest/ai-api.md) + - [ML API](./10-rest/ml-api.md) + - [Security API](./10-rest/security-api.md) + - [Compliance API](./10-rest/compliance-api.md) + - [Example Integrations](./10-rest/examples.md) # Part X - Feature Deep Dive -- [Chapter 11: Feature Reference](./chapter-11-features/README.md) - - [Feature Editions](./chapter-11-features/editions.md) - - [Core Features](./chapter-11-features/core-features.md) - - [Conversation Management](./chapter-11-features/conversation.md) - - [AI and LLM](./chapter-11-features/ai-llm.md) - - [Knowledge Base](./chapter-11-features/knowledge-base.md) - - [Automation](./chapter-11-features/automation.md) - - [Email Integration](./chapter-11-features/email.md) - - [Storage and Data](./chapter-11-features/storage.md) - - [Multi-Channel Support](./chapter-11-features/channels.md) - - [Drive Monitor](./chapter-11-features/drive-monitor.md) - - [Platform Capabilities](./chapter-11-features/platform-comparison.md) - - [Enterprise Platform Migration](./chapter-11-features/m365-comparison.md) - - [Projects](./chapter-11-features/projects.md) - - [Multi-Agent Office Suite Design](./chapter-11-features/multi-agent-design.md) - - [What's New: Multi-Agent Features](./chapter-11-features/whats-new.md) - - [Multi-Agent Orchestration](./chapter-11-features/multi-agent-orchestration.md) - - [Memory Management](./chapter-11-features/memory-management.md) - - [Hybrid RAG Search](./chapter-11-features/hybrid-search.md) - - [Transfer to Human](./chapter-11-features/transfer-to-human.md) - - [LLM-Assisted Attendant](./chapter-11-features/attendant-llm-assist.md) +- [Chapter 11: Feature Reference](./11-features/README.md) + - [Feature Editions](./11-features/editions.md) + - [Core Features](./11-features/core-features.md) + - [Conversation Management](./11-features/conversation.md) + - [AI and LLM](./11-features/ai-llm.md) + - [Knowledge Base](./11-features/knowledge-base.md) + - [Automation](./11-features/automation.md) + - [Email Integration](./11-features/email.md) + - [Storage and Data](./11-features/storage.md) + - [Multi-Channel Support](./11-features/channels.md) + - [Drive Monitor](./11-features/drive-monitor.md) + - [Platform Capabilities](./11-features/platform-comparison.md) + - [Enterprise Platform Migration](./11-features/m365-comparison.md) + - [Projects](./11-features/projects.md) + - [Multi-Agent Office Suite Design](./11-features/multi-agent-design.md) + - [What's New: Multi-Agent Features](./11-features/whats-new.md) + - [Multi-Agent Orchestration](./11-features/multi-agent-orchestration.md) + - [Memory Management](./11-features/memory-management.md) + - [Hybrid RAG Search](./11-features/hybrid-search.md) + - [Transfer to Human](./11-features/transfer-to-human.md) + - [LLM-Assisted Attendant](./11-features/attendant-llm-assist.md) # Part XI - Security -- [Chapter 12: Authentication & Permissions](./chapter-12-auth/README.md) - - [User Authentication](./chapter-12-auth/user-auth.md) - - [Password Security](./chapter-12-auth/password-security.md) - - [API Endpoints](./chapter-12-auth/api-endpoints.md) - - [Bot Authentication](./chapter-12-auth/bot-auth.md) - - [Security Features](./chapter-12-auth/security-features.md) - - [Security Policy](./chapter-12-auth/security-policy.md) - - [Compliance Requirements](./chapter-12-auth/compliance-requirements.md) - - [Permissions Matrix](./chapter-12-auth/permissions-matrix.md) - - [User Context vs System Context](./chapter-12-auth/user-system-context.md) +- [Chapter 12: Authentication & Permissions](./12-auth/README.md) + - [User Authentication](./12-auth/user-auth.md) + - [Password Security](./12-auth/password-security.md) + - [API Endpoints](./12-auth/api-endpoints.md) + - [Bot Authentication](./12-auth/bot-auth.md) + - [Security Features](./12-auth/security-features.md) + - [Security Policy](./12-auth/security-policy.md) + - [Compliance Requirements](./12-auth/compliance-requirements.md) + - [Permissions Matrix](./12-auth/permissions-matrix.md) + - [User Context vs System Context](./12-auth/user-system-context.md) # Part XII - Community -- [Chapter 13: Contributing](./chapter-13-community/README.md) - - [Development Setup](./chapter-13-community/setup.md) - - [Testing Guide](./chapter-13-community/testing.md) - - [Documentation](./chapter-13-community/documentation.md) - - [Pull Requests](./chapter-13-community/pull-requests.md) - - [Community Guidelines](./chapter-13-community/community.md) - - [IDEs](./chapter-13-community/ide-extensions.md) +- [Chapter 13: Contributing](./13-community/README.md) + - [Development Setup](./13-community/setup.md) + - [Testing Guide](./13-community/testing.md) + - [Documentation](./13-community/documentation.md) + - [Pull Requests](./13-community/pull-requests.md) + - [Community Guidelines](./13-community/community.md) + - [IDEs](./13-community/ide-extensions.md) # Part XIII - Migration -- [Chapter 14: Migration Guide](./chapter-14-migration/README.md) - - [Migration Overview](./chapter-14-migration/overview.md) - - [Platform Comparison Matrix](./chapter-14-migration/comparison-matrix.md) - - [Migration Resources](./chapter-14-migration/resources.md) - - [Common Concepts](./chapter-14-migration/common-concepts.md) - - [Knowledge Base Migration](./chapter-14-migration/kb-migration.md) - - [Cloud Productivity Migration](./chapter-14-migration/google-workspace.md) - - [Enterprise Platform Migration](./chapter-14-migration/microsoft-365.md) - - [n8n Migration](./chapter-14-migration/n8n.md) - - [Notion Migration](./chapter-14-migration/notion.md) - - [Perplexity Migration](./chapter-14-migration/perplexity.md) - - [Zapier and Make Migration](./chapter-14-migration/zapier-make.md) - - [Intercom Migration](./chapter-14-migration/intercom.md) - - [Dialogflow Migration](./chapter-14-migration/dialogflow.md) - - [Botpress Migration](./chapter-14-migration/botpress.md) - - [Automation Migration](./chapter-14-migration/automation.md) - - [Validation and Testing](./chapter-14-migration/validation.md) +- [Chapter 14: Migration Guide](./14-migration/README.md) + - [Migration Overview](./14-migration/overview.md) + - [Platform Comparison Matrix](./14-migration/comparison-matrix.md) + - [Migration Resources](./14-migration/resources.md) + - [Common Concepts](./14-migration/common-concepts.md) + - [Knowledge Base Migration](./14-migration/kb-migration.md) + - [Cloud Productivity Migration](./14-migration/google-workspace.md) + - [Enterprise Platform Migration](./14-migration/microsoft-365.md) + - [n8n Migration](./14-migration/n8n.md) + - [Notion Migration](./14-migration/notion.md) + - [Perplexity Migration](./14-migration/perplexity.md) + - [Zapier and Make Migration](./14-migration/zapier-make.md) + - [Intercom Migration](./14-migration/intercom.md) + - [Dialogflow Migration](./14-migration/dialogflow.md) + - [Botpress Migration](./14-migration/botpress.md) + - [Automation Migration](./14-migration/automation.md) + - [Validation and Testing](./14-migration/validation.md) # Appendices -- [Appendix A: Database Model](./appendix-15/README.md) - - [Schema Overview](./appendix-15/schema.md) - - [Tables](./appendix-15/tables.md) - - [Relationships](./appendix-15/relationships.md) +- [Appendix A: Database Model](./15-appendix/README.md) + - [Schema Overview](./15-appendix/schema.md) + - [Tables](./15-appendix/tables.md) + - [Relationships](./15-appendix/relationships.md) -- [Appendix B: External Services](./appendix-external-services/README.md) - - [Service Catalog](./appendix-external-services/catalog.md) - - [LLM Providers](./appendix-external-services/llm-providers.md) - - [Weather API](./appendix-external-services/weather.md) - - [Channel Integrations](./appendix-external-services/channels.md) - - [Storage Services](./appendix-external-services/storage.md) - - [Directory Services](./appendix-external-services/directory.md) - - [Attendance Queue](./appendix-external-services/attendance-queue.md) - - [Hosting, DNS, and MDA](./appendix-external-services/hosting-dns.md) - - [Time-Series Database](./appendix-external-services/timeseries.md) - - [NVIDIA GPU](./appendix-external-services/nvidia.md) - - [Multimodal](./appendix-external-services/multimodal.md) - - [Console (XtreeUI)](./appendix-external-services/console.md) +- [Appendix B: External Services](./18-appendix-external-services/README.md) + - [Service Catalog](./18-appendix-external-services/catalog.md) + - [LLM Providers](./18-appendix-external-services/llm-providers.md) + - [Weather API](./18-appendix-external-services/weather.md) + - [Channel Integrations](./18-appendix-external-services/channels.md) + - [Storage Services](./18-appendix-external-services/storage.md) + - [Directory Services](./18-appendix-external-services/directory.md) + - [Attendance Queue](./18-appendix-external-services/attendance-queue.md) + - [Hosting, DNS, and MDA](./18-appendix-external-services/hosting-dns.md) + - [Time-Series Database](./18-appendix-external-services/timeseries.md) + - [NVIDIA GPU](./18-appendix-external-services/nvidia.md) + - [Multimodal](./18-appendix-external-services/multimodal.md) + - [Console (XtreeUI)](./18-appendix-external-services/console.md) -- [Appendix C: Environment Variables](./appendix-env-vars/README.md) -- [Appendix D: Documentation Style](./appendix-docs-style/conversation-examples.md) - - [SVG and Conversation Standards](./appendix-docs-style/svg.md) +- [Appendix D: Documentation Style](./16-appendix-docs-style/conversation-examples.md) + - [SVG and Conversation Standards](./16-appendix-docs-style/svg.md) [Glossary](./glossary.md) [Contact](./contact/README.md) \ No newline at end of file diff --git a/src/appendix-env-vars/README.md b/src/appendix-env-vars/README.md deleted file mode 100644 index 4d0cce7a..00000000 --- a/src/appendix-env-vars/README.md +++ /dev/null @@ -1,135 +0,0 @@ -# Appendix C: Environment Variables - -General Bots uses a **minimal set of environment variables**. All configuration is managed through `config.csv` files within each bot's `.gbot` folder, with secrets stored securely in Vault. - -## Required Environment Variables - -Only Vault-related environment variables are required by General Bots: - -| Variable | Description | Example | -|----------|-------------|---------| -| `VAULT_ADDR` | Vault server URL | `http://localhost:8200` | -| `VAULT_TOKEN` | Authentication token | Auto-generated during bootstrap | -| `VAULT_NAMESPACE` | Vault namespace (optional) | `admin` | - -## Setting Environment Variables - -### Linux/macOS - -```botbook/src/appendix-env-vars/example.sh#L1-2 -export VAULT_ADDR=http://localhost:8200 -export VAULT_TOKEN=hvs.your-vault-token -``` - -### Systemd Service - -```botbook/src/appendix-env-vars/example.service#L1-3 -[Service] -Environment="VAULT_ADDR=http://localhost:8200" -Environment="VAULT_TOKEN=hvs.your-vault-token" -``` - -### LXC Container - -```botbook/src/appendix-env-vars/example-lxc.sh#L1-2 -lxc config set container-name environment.VAULT_ADDR="http://localhost:8200" -lxc config set container-name environment.VAULT_TOKEN="hvs.your-vault-token" -``` - -## Auto-Managed Services - -The following services are **automatically configured through Vault** during bootstrap: - -| Service | Management | -|---------|------------| -| PostgreSQL | Connection credentials stored in Vault | -| S3-Compatible Storage | Access keys stored in Vault | -| Cache | Connection managed via Vault | -| Email (Stalwart) | Credentials stored in Vault | -| LLM API Keys | Stored in Vault | - -You do **not** need environment variables for these services. Vault handles credential distribution and rotation automatically. - -## Everything Else Goes in config.csv - -**All application configuration belongs in `config.csv`**, not environment variables: - -| Configuration | Where to Configure | -|--------------|-------------------| -| LLM provider/model | `config.csv`: `llm-url`, `llm-model` | -| Email settings | `config.csv`: `email-*` | -| Channel tokens | `config.csv`: `whatsapp-*`, `telegram-*`, etc. | -| Bot settings | `config.csv`: all bot-specific settings | -| Feature flags | `config.csv`: various keys | -| Theme settings | `config.csv`: `theme-*` | -| Server port | `config.csv`: `server_port` | - -### Example config.csv - -```botbook/src/appendix-env-vars/example-config.csv#L1-8 -name,value -llm-url,http://localhost:8081 -llm-model,model.gguf -server_port,8080 -theme-color1,#0d2b55 -whatsapp-business-id,your-business-id -admin-email,admin@example.com -``` - -## Configuration Philosophy - -General Bots follows these principles: - -1. **Vault-First** β€” All secrets are managed by Vault -2. **Minimal Environment** β€” Only Vault address and token use environment variables -3. **config.csv for Settings** β€” All application configuration is in `config.csv` -4. **Per-Bot Configuration** β€” Each bot has its own `config.csv` in its `.gbot` folder -5. **No Hardcoded Secrets** β€” Never store secrets in code or config files - -## Bootstrap Process - -During bootstrap, General Bots: - -1. Connects to Vault using `VAULT_*` variables -2. Retrieves or generates credentials for all managed services -3. Configures database, storage, cache, and other services -4. Stores service credentials securely in Vault - -This eliminates the need for manual credential management. - -## Security Notes - -1. **Never commit tokens** β€” Use `.env` files (gitignored) or secrets management -2. **Rotate regularly** β€” Vault tokens should be rotated periodically -3. **Limit access** β€” Only the botserver process needs these variables -4. **Use TLS** β€” Always use HTTPS for Vault in production - -## Troubleshooting - -### Vault Connection Failed - -``` -Error: Failed to connect to Vault -``` - -Verify: -- `VAULT_ADDR` is set correctly -- Vault server is running and accessible -- `VAULT_TOKEN` is valid and not expired -- Network allows connection to Vault host - -### Service Not Available - -If a managed service (database, storage, cache) is unavailable: - -1. Check Vault is running and unsealed -2. Verify secrets exist in Vault at expected paths -3. Check service container/process status -4. Review logs for connection errors - -## See Also - -- [config.csv Format](../chapter-08-config/config-csv.md) β€” Bot configuration reference -- [Secrets Management](../chapter-08-config/secrets-management.md) β€” Vault integration details -- [Drive Integration](../chapter-08-config/drive.md) β€” Storage setup -- [Authentication](../chapter-12-auth/README.md) β€” Security features \ No newline at end of file