Skip to content

Commit

Permalink
new(all): New web params in gbot.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Nov 30, 2024
1 parent 0cfc297 commit ce0ed49
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 19 deletions.
2 changes: 2 additions & 0 deletions site/docs/chapter-05-gbdialog-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ To organize the instructions functionally, I'll group them into five categories:
| HEAR _variable_ AS "Abacate", "Maçã", "Morango" | Displays the specified menu and waits for user selection. | <pre>HEAR fruit AS "Abacate", "Maçã", "Morango" <br/> TALK "You selected: " + fruit.</pre> |
| HEAR _variable_ AS LANGUAGE | Hears and validates a language code from the user. | <pre>HEAR language AS LANGUAGE <br/> TALK "Language selected: " + language.</pre> |
| HEAR _variable_ AS LOGIN (internal) | Waits for Active Directory login integration before proceeding. | <pre>HEAR user AS LOGIN <br/> TALK "User logged in: " + user.</pre> |
| HEAR _variable_ AS QRCODE | Hears and validates a QR code from a captured image. | <pre>TALK "Send me an image with a QR Code."<br/>HEAR qrcode AS QRCODE <br/> TALK "QR Code received: " + qrcode.</pre> |

## Data Handling

Expand All @@ -112,6 +113,7 @@ To organize the instructions functionally, I'll group them into five categories:
| data = SELECT a, SUM(b) AS b FROM data GROUP BY a | Use SQL to manipulate a data variable returned from FIND or an array | <pre>data = FIND "sales_data.xlsx", "A1:B10" <br/> result = SELECT product, SUM(amount) AS total FROM data GROUP BY product <br/> TALK "Query result: " + result.</pre> |
| file = data AS IMAGE | Converts a two-dimensional array into an image file. | <pre>file = data AS IMAGE <br/> SAVE file AS "sales_chart.png" <br/> TALK "Chart saved as image."</pre> |
| file = data AS PDF | Converts a two-dimensional array into a PDF file. | <pre>file = data AS PDF <br/> SAVE file AS "sales_report.pdf" <br/> TALK "Report saved as PDF."</pre> |
| file = CONVERT "mydesign.ai" | Converts a Adobe Illustrator to a HTML page. |
| NEW OBJECT | Creates a new object to be used with REST calls. | <pre>data = NEW OBJECT <br/> data.color = "blue" <br/> TALK "New object created."</pre> |
| NEW ARRAY | Creates a new array. | <pre>data = NEW ARRAY <br/> data[0] = "red" <br/> TALK "New array created."</pre> |
| QRCODE | Creates a QR code from specified text. | <pre>file = QRCODE "https://example.com" <br/> SAVE file AS "qrcode.png" <br/> TALK "QR Code generated."</pre> |
Expand Down
14 changes: 12 additions & 2 deletions site/docs/chapter-06-gbapp-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,26 @@ apt install code
curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh && sudo -E bash nodesource_setup.sh && sudo apt-get install -y nodejs && node -v
```

#### Additional Infrastructure



```
apt-get update
apt-get install build-essential cmake git pkg-config libjpeg-dev libtiff-dev libpng-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libatlas-base-dev gfortran python3-dev
export OPENCV4NODEJS_DISABLE_AUTOBUILD=1
export OPENCV_LIB_DIR=/usr/lib/x86_64-linux-gnu
apt-get install cpulimit
sudo apt-get install expect
apt-get install expect
apt-get install libxtst-dev
apt-get install libpng-dev
```


Expand Down
37 changes: 20 additions & 17 deletions site/docs/chapter-07-gbot-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ here is a list of admin commands related to deploying .gb\* files.
| WhatsApp Group ID | Group ID (accessible only in internal log) used to connect the Bot to a WhatsApp group. |
| WhatsApp Group Name | WhatsApp group name that this Bot belongs to. |
| WhatsApp Group Shortcuts | Space separeted list of triggers in text that will active Bot in groups. |
| Website | URL of website to use as bot knowledge base. Note: Answer Mode should be 'document' while using crawler. |
| Website Depth | Maximum website hyperlinks depth when crawling page contents. |
| Website Max Documents | Maximum website document count to be added to LLM embeddings. |
| XRM Key | String key of HubSpot (currently) API. |

Note that this variables are available in every .gbdialog code, automatically.
Expand Down Expand Up @@ -180,23 +183,23 @@ The "Synchronize Database" setting determines whether the TABLE keyword should m

You can change the theme color of the bot by selecting a color from the palette of General Bots available theme colors:

| Color |
|----------|
| grey |
| light |
| red |
| blue |
| green |
| yellow |
| purple |
| orange |
| brown |
| pink |
| cyan |
| lime |
| indigo |
| teal |
| violet |
| Color |
| ----------- |
| grey |
| light |
| red |
| blue |
| green |
| yellow |
| purple |
| orange |
| brown |
| pink |
| cyan |
| lime |
| indigo |
| teal |
| violet |
| black-white |

---
Expand Down

0 comments on commit ce0ed49

Please sign in to comment.