Input: {"body":{"messages":[{"content":"You need to tag the input with the following labels based on the question asked:\nABSOLUTELY_NOT: You are absolutely sure that the answer is \"NO\" to the question.\nPROBABLY_NOT: You are leaning towards \"NO\" to the question.\nAMBIGUOUS: You are unsure about the answer to the question.\nPROBABLY_YES: You are leaning towards \"YES\" to the question.\nABSOLUTELY_YES: You are absolutely sure that the answer is \"YES\" to the question.\n\nYou need to return a mapping of the labels, an explanation and the answer for each label following the format below:\n```\n■is_about_animals:【explanation (where \"explanation\" is answering the question \"is the text about animals?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_lua_code:【explanation (where \"explanation\" is answering the question \"does the text contain Lua code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_python_code:【explanation (where \"explanation\" is answering the question \"does the text contain Python code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_js_code:【explanation (where \"explanation\" is answering the question \"does the text contain JavaScript code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■is_botpress:【explanation (where \"explanation\" is answering the question \"is the text about Botpress?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■is_rasa:【explanation (where \"explanation\" is answering the question \"is the text about Rasa?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_flows:【explanation (where \"explanation\" is answering the question \"does the text mention flows?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_api:【explanation (where \"explanation\" is answering the question \"does the text mention the Botpress API?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_enterprise:【explanation (where \"explanation\" is answering the question \"does the text mention Botpress Enterprise?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_workspaces:【explanation (where \"explanation\" is answering the question \"does the text mention workspaces?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_webchat:【explanation (where \"explanation\" is answering the question \"does the text mention the Webchat?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_hitl:【explanation (where \"explanation\" is answering the question \"does the text mention HITL (human in the loop)?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n■END■\n```\n\nundefined\n\n===\nYou should consider the Expert Examples below to help you make your decision.\nIn your \"Analysis\", please refer to the Expert Examples # to justify your decision.","role":"system"},{"content":"Input to tag:\n<|start_input|>\nchemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Utilities\nCards that provide utility in the Studio, and are not part of your bot's workflow.\n[ Suggest Edits](/edit/utilities)\nComment\n[](#comment)\nThe Comment card allows you to add a comment to the flow. It is useful to explain the flow to other people or to add notes to yourself.\nPick the Comment Card from the Utility Cards section in the Toolbox and drop it on the flow, or right-click the editor to see the Comment option. Click on the card to edit the content.\nYou can change the text size, color and style. You can add links, preformatted code and bullet point lists.\nImage\n[](#image)\nThe Image card allows you to add an image window to the flow. It prompts you to select a file from your local machine. The image can't be changed later.\nVideo\n[](#video)\nThe Video card allows you to add a video window to the flow. It accepts YouTube URLs and it's useful for adding relevant content that don't fit in notes or images. The video can't be changed later.\nLog\n[](#log)\nLogs a message to the Logs console and the Emulator for debugging purposes (similar to a console.log inside an execute code card), You can use it to print variables, messages or any other information you need to debug your flow.\nLog Message\n[](#log-message)\nThe message you want to log. You can use variables and expressions.\nThe log message can be a simple text or a JSON object. If you use a JSON object, it will be displayed in a more readable way.\nLogging Levels\n[](#logging-levels)\nDebug\n[](#debug)\nUse this level to log detailed information about the flow execution. It's useful to debug the flow and understand how it works.\nInfo\n[](#info)\nUse this level to log general information about the flow execution. It's useful to understand the flow behavior and the data it's processing.\nWarning\n[](#warning)\nUse this level to log warnings about the flow execution. It's useful to alert about potential issues or unexpected behavior.\nError\n[](#error)\nUse this level to log errors about the flow execution. It's useful to alert about critical issues that need to be fixed.\nUpdated about 1 month ago\n---\n* [Table of Contents](#)\n* * [Comment](#comment)  \n   * [Image](#image)  \n   * [Video](#video)  \n   * [Log](#log)  \n         * [Log Message](#log-message)  \n         * [Logging Levels](#logging-levels)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nWebchat\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Webchat\n[ Suggest Edits](/edit/webchat)\n![](https://files.readme.io/1538ac2-image.png)\nThe Webchat is a widget that you can add to your website to allow your users to interact with your chatbot. It's a great way to provide support to your users and answer their questions.\nPrerequisites\n[](#prerequisites)\n* A [Botpress Cloud account](https://sso.botpress.cloud) and a [Botpress Bot](https://botpress.com/docs/cloud/getting-started/create-and-publish-your-chatbot/)\n* Make sure you've [published your Botpress bot](../docs/create-publish-your-chatbot#publishing-your-bot).\nSetting up the Webchat integration in Botpress\n[](#setting-up-the-webchat-integration-in-botpress)\n1. Go to the [Integration Hub](https://app.botpress.cloud/hub) in Botpress Cloud (if you don't have the integration installed yet).\n2. Find and open the Webchat integration then click on the \"Install to Bot\" button, now go back to your bot.\nSetting up the Webchat\n[](#setting-up-the-webchat)\nPre-configured Script\n[](#pre-configured-script)\n**Shareable URL**\nYou can share your chatbot with people that would like to quickly test your chatbot using the **Shareable Link**.\n**Embedded Script**\nThis script will add the webchat to your website. You can copy the script and paste it in the `<body></body>` tag of your HTML page.\nThis is the **recommended** way of adding the webchat to your website.\nConfigurable Script\n[](#configurable-script)\nThe configurable webchat code must be updated manually every time there is a change. We highly recommend using the **Pre-configured** version.\nCopy the code from the **Configurable** tab and paste it in the `<body></body>` tag of your HTML page.\nConfigurable Script Parameters\n[](#configurable-script-parameters)\nYou can customize the webchat by changing/adding the values of the parameters in the script.\n| **Parameter**              | **Description**                                                                                | **Default value**    | **parameter type** |\n| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------ |\n| stylesheet                 | Provide a path to a stylesheet to customize the webchat                                                                                | \\-                   | string             |\n| showConversationsButton    | If false, will hide the conversation list pane                                                                                | true                 | boolean            |\n| showTimestamp              | If true, will display a timestamp under each messages                                                                                | false                | boolean            |\n| enableTranscriptDownload   | Allows the user to download the conversation history                                                                                | true                 | boolean            |\n| enableConversationDeletion | Allows the user to delete its conversation history                                                                                | false                | boolean            |\n| closeOnEscape              | Close the webchat when pressing the Esc key                                                                                | true                 | boolean            |\n| botName                    | Displays the bot name to the right of its avatar                                                                                | \\-                   | string             |\n| composerPlaceholder        | Allows to set a custom composer placeholder                                                                                | 'Reply to {botname}' | string             |\n| avatarUrl                  | Allow to specify a custom URL for the bot's avatar                                                                                | \\-                   | string             |\n| locale                     | Force the display language of the webchat (en, fr, ar, ru, etc..)  Defaults to the user's browser language if not set Set to 'browser' to force use the browser's language | 'browser'            | string             |\n| botConversationDescription | Small description written under the bot's name                                                                                | \\-                   | string             |\n| hideWidget                 | When true, the widget button to open the chat is hidden                                                                                | false                | boolean            |\n| disableAnimations          | Disable the slide in / out animations of the webchat                                                                                | false                | boolean            |\n| useSessionStorage          | Use sessionStorage instead of localStorage, which means the session expires when tab is closed                                                                             | false                | boolean            |\n| containerWidth             | Sends an event to the parent container with the width provided                                                                                | 360                  | string OR number   |\n| layoutWidth                | Sets the width of the webchat                                                                                | 360                  | string OR number   |\n| enablePersistHistory       | When enabled, sent messages are persisted to local storage (recall previous messages)                                                                                | true                 | boolean            |\n| className                  | CSS class to be applied to iframe                                                                                | \\-                   | string             |\n| disableNotificationSound   | If true, chat will no longer play the notification sound for new messages.                                                                                | false                | boolean            |\n| googleMapsAPIKey           | Google Maps API Key required to display the map. It will display a link to Google Maps otherwise.                                                                          | \\-                   | string             |\n| website                    | Displays the bot's website in the conversation page                                                                                | \\-                   | string             |\n| phoneNumber                | Displays the bot's contact phone number in the conversation page                                                                                | \\-                   | string             |\n| termsConditions            | Displays the bot's terms of service in the conversation page                                                                                | \\-                   | string             |\n| privacyPolicy              | Displays the bot's privacy policy in the conversation page                                                                                | \\-                   | string             |\n| emailAddress               | Displays the bot's email address in the conversation page.                                                                                | \\-                   | string             |\n| coverPictureUrl            | Displays the bot's cover picture in the conversation page                                                                                | \\-                   | string             |\n| showBotInfoPage            | Enables the bot's information page in the webchat                                                                                | false                | boolean            |\n| showCloseButton            | Display's the webchat close button when the webchat is opened                                                                                | true                 | boolean            |\n| userData                   | Passes the user data to the bot                                                                                | \\-                   | object             |\n| customUser                 | Passes the custom user data to the bot                                                                                | \\-                   | object             |\nDomain Whitelisting\n[](#domain-whitelisting)\n> ## ��\n>\n> Team Plan\n>\n> This feature is only available to Team plan subscribers.\nThe domain whitelisting feature ensures that only approved domains can host and utilize the chatbot. This enhances security and control, ensuring that your chatbot is only available on trusted websites.\nConfiguring Allowed Origins\n[](#configuring-allowed-origins)\n1. Navigate to the Webchat integration settings on your Dashboard\n2. Expand the 'Advanced Settings' menu\n3. To add a domain (or an allowed origin), type the domain name in the provided field. You can provide multiple allowed origins or whitelisted domains.\nMake sure to save the configuration after you've indicated which domains you want to whitelist.\nCustomizing/Controlling the Webchat\n[](#customizingcontrolling-the-webchat)\nFor more information on customizing the webchat, please refer to the [Webchat developer documentation](../docs/controlling-web-chat-using-javascript).\nUpdated 3 months ago\n---\n* [Table of Contents](#)\n* * [Prerequisites](#prerequisites)  \n   * [Setting up the Webchat integration in Botpress](#setting-up-the-webchat-integration-in-botpress)  \n   * [Setting up the Webchat](#setting-up-the-webchat)  \n         * [Pre-configured Script](#pre-configured-script)  \n         * [Configurable Script](#configurable-script)  \n         * [Configurable Script Parameters](#configurable-script-parameters)  \n         * [Domain Whitelisting](#domain-whitelisting)  \n         * [Customizing/Controlling the Webchat](#customizingcontrolling-the-webchat)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nUsage\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/cont\n<|end_input|>\n\nAnswer with this following format:\n```\n■is_about_animals:【explanation (where \"explanation\" is answering the question \"is the text about animals?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_lua_code:【explanation (where \"explanation\" is answering the question \"does the text contain Lua code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_python_code:【explanation (where \"explanation\" is answering the question \"does the text contain Python code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_js_code:【explanation (where \"explanation\" is answering the question \"does the text contain JavaScript code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■is_botpress:【explanation (where \"explanation\" is answering the question \"is the text about Botpress?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■is_rasa:【explanation (where \"explanation\" is answering the question \"is the text about Rasa?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_flows:【explanation (where \"explanation\" is answering the question \"does the text mention flows?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_api:【explanation (where \"explanation\" is answering the question \"does the text mention the Botpress API?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_enterprise:【explanation (where \"explanation\" is answering the question \"does the text mention Botpress Enterprise?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_workspaces:【explanation (where \"explanation\" is answering the question \"does the text mention workspaces?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_webchat:【explanation (where \"explanation\" is answering the question \"does the text mention the Webchat?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_hitl:【explanation (where \"explanation\" is answering the question \"does the text mention HITL (human in the loop)?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n■END■\n```\n\nFormat cheatsheet:\n```\n■label:【explanation】:x■\n```\n\nWhere `x` is one of the following: ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES\n\nRemember: In your `explanation`, please refer to the Expert Examples # (and quote them) that are relevant to ground your decision-making process.\nThe Expert Examples are there to help you make your decision. They have been provided by experts in the field and their answers (and reasoning) are considered the ground truth and should be used as a reference to make your decision when applicable.\nFor example, you can say: \"According to Expert Example #1, ...\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.label","promptSource":"zai:zai.label:default"},"model":"fast","signal":{},"stopSequences":["■END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■is_about_animals:【The document is a Botpress documentation page covering features, integrations, webchat, APIs, etc. There is no mention of animals whatsoever.】:ABSOLUTELY_NOT■

■contains_lua_code:【The text consists of markdown links, headings and tables. No Lua syntax or code snippets are present.】:ABSOLUTELY_NOT■

■contains_python_code:【No Python code appears in the content; it is purely documentation text.】:ABSOLUTELY_NOT■

■contains_js_code:【While the term “JavaScript” is referenced (e.g., “Controlling Web Chat using JavaScript”), no actual JavaScript code is included in the excerpt.】:ABSOLUTELY_NOT■

■is_botpress:【The entire passage is Botpress documentation, repeatedly referencing Botpress features, URLs, and terminology (e.g., “Botpress Cloud”, “Botpress Studio”, “Botpress APIs”).】:ABSOLUTELY_YES■

■is_rasa:【There is no mention of the Rasa platform or related terminology anywhere in the text.】:ABSOLUTELY_NOT■

■has_flows:【The word “Flows” appears multiple times in section headings such as “Flows”, “Studio Interface Flows”, and in the navigation list, indicating that flows are mentioned.】:ABSOLUTELY_YES■

■has_api:【The document lists “Botpress APIs”, including “Files API” and “Chat API”, clearly mentioning APIs.】:ABSOLUTELY_YES■

■has_enterprise:【The term “Enterprise” does not appear; only “Team Plan” is referenced. No explicit mention of Botpress Enterprise is found.】:ABSOLUTELY_NOT■

■has_workspaces:【The section “Workspace” appears repeatedly under the Dashboard navigation (“Workspace”, “Home”, “Members”, etc.), showing that workspaces are mentioned.】:ABSOLUTELY_YES■

■has_webchat:【The text contains numerous references to “Webchat”, including sections titled “Webchat”, “Webchat v1”, “Webchat v2”, and configuration details, confirming its presence.】:ABSOLUTELY_YES■

■has_hitl:【“HITL” (human‑in‑the‑loop) is mentioned several times in the integrations list and in documentation sections, indicating it is referenced.】:ABSOLUTELY_YES■


Input: {"body":{"messages":[{"content":"You need to tag the input with the following labels based on the question asked:\nABSOLUTELY_NOT: You are absolutely sure that the answer is \"NO\" to the question.\nPROBABLY_NOT: You are leaning towards \"NO\" to the question.\nAMBIGUOUS: You are unsure about the answer to the question.\nPROBABLY_YES: You are leaning towards \"YES\" to the question.\nABSOLUTELY_YES: You are absolutely sure that the answer is \"YES\" to the question.\n\nYou need to return a mapping of the labels, an explanation and the answer for each label following the format below:\n```\n■is_about_animals:【explanation (where \"explanation\" is answering the question \"is the text about animals?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_lua_code:【explanation (where \"explanation\" is answering the question \"does the text contain Lua code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_python_code:【explanation (where \"explanation\" is answering the question \"does the text contain Python code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_js_code:【explanation (where \"explanation\" is answering the question \"does the text contain JavaScript code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■is_botpress:【explanation (where \"explanation\" is answering the question \"is the text about Botpress?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■is_rasa:【explanation (where \"explanation\" is answering the question \"is the text about Rasa?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_flows:【explanation (where \"explanation\" is answering the question \"does the text mention flows?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_api:【explanation (where \"explanation\" is answering the question \"does the text mention the Botpress API?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_enterprise:【explanation (where \"explanation\" is answering the question \"does the text mention Botpress Enterprise?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_workspaces:【explanation (where \"explanation\" is answering the question \"does the text mention workspaces?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_webchat:【explanation (where \"explanation\" is answering the question \"does the text mention the Webchat?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_hitl:【explanation (where \"explanation\" is answering the question \"does the text mention HITL (human in the loop)?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n■END■\n```\n\nundefined\n\n===\nYou should consider the Expert Examples below to help you make your decision.\nIn your \"Analysis\", please refer to the Expert Examples # to justify your decision.","role":"system"},{"content":"Input to tag:\n<|start_input|>\nchemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Tables\n[ Suggest Edits](/edit/tables)\nTables are an essential feature in the explorer, functioning as a local database within your chatbot's environment. They provide structured storage for various types of data that can be accessed and manipulated as required within your workflows.\nThey are particularly useful for storing information that needs to be persisted across multiple sessions, such as user profiles, transaction histories, and other types of data that need to be retrieved and updated over time.\n> ## ���\n>\n> Note\n>\n> You can create up to **10 tables** with **20 columns** and **10,000 rows** in the **Free Plan**. [Get in touch](https://botpress.com/contact-us) if you want to increase the limits. However, the 20 columns per table is a hard limit that can't be increased.\nCreating a Table\n[](#creating-a-table)\nTo add a new table, go to the explorer menu and select `Add Table`. You can then give your table a name and add fields to it. Each field has a name and a type. The type determines the kind of data that can be stored in the field. For example, a field with the type `String` can store any text value, while a field with the type `Number` can only store numeric values.\nMaking Fields Searchable\n[](#making-fields-searchable)\nYou can make a field searchable by checking the `Searchable` checkbox. This will allow you to search for records based on the values in the field. For example, if you have a field called `Name` and you make it searchable, you can search for records based on the name of the person. This is only available for fields with the type `String`.\nTypes of Fields (Columns)\n[](#types-of-fields-columns)\nThere are several types of fields you can add to a table. Each field type has a specific purpose and can only store certain types of data. These are the field types you can choose from: `String`, `Number`, `Boolean`, `Date`, and `Object`.\n> ## ���\n>\n> Warning\n>\n> The number of columns has a hard limit of **20 columns** per table.\nFiltering Records\n[](#filtering-records)\nTable filters are a powerful feature that allows you to refine and display only the records that meet certain criteria. Filters can be based on specific conditions, such as date ranges, text matches, and numerical comparisons.\nLogical Operators\n[](#logical-operators)\n* **AND**: Use the AND operator when you want all conditions to be true for a record to be displayed. For example, filtering by `createdAt` AND `status` will only show records that match both conditions.\n* **OR**: Use the OR operator to display records that match any one of multiple conditions. For example, filtering by `createdAt` OR `updatedAt` will show records that match either one of the conditions.\nTypes of Rules\n[](#types-of-rules)\nRules define the individual conditions applied to each column of data.\n* `is equal to`: Shows records where the field is equal to the specified value.\n* `is not equal to`: Shows records where the field is not equal to the specified value.\n* `less than`: Shows records where the field is less than the specified value.\n* `less than or equal to`: Shows records where the field is less than or equal to the specified value.\n* `greater than`: Shows records where the field is greater than the specified value.\n* `greater than or equal to`: Shows records where the field is greater than or equal to the specified value.\n* `in`: Shows records where the field matches any of the specified values.\n* `not in`: Shows records where the field does not match any of the specified values.\n* `is null`: Shows records where the field is empty.\n* `is not null`: Shows records where the field is not empty.\nRule Groups\n[](#rule-groups)\n* **Group**: A group is a collection of rules combined by a logical operator (AND/OR). You can nest groups to create complex filters.\nCreating a Filter\n[](#creating-a-filter)\n1. Click on the `Filter` button to expand the filter menu.\n2. Select a logical operator (AND/OR) from the dropdown.\n3. Choose a field to filter by (e.g., `createdAt`).\n4. Select a rule (e.g., `is equal to`).\n5. Enter the required value or select from a calendar if it's a date field.\n6. To add another rule within the same logical condition, click the `+ Rule` button.\n7. To create a nested group of conditions, click the `+ Group` button.\n8. Apply the filter by clicking the `Apply filter` button.\nManually Editing Filters\n[](#manually-editing-filters)\nClick on **Edit Manually** to view and edit the filter in JSON format. You can then copy this JSON filter and use it in your table operations via code.\nOperations on Tables - via the Interface\n[](#operations-on-tables---via-the-interface)\nAdd records to a table\n[](#add-records-to-a-table)\nOnce you've created a table, you can add records to it. To do this, click on the table in the explorer menu. You'll then see a list of all the records in the table. Click on the `Add Record` button to add a new record. You can then enter the values for each field in the record.\nUpdate records in a table\n[](#update-records-in-a-table)\nDouble click on a a table cell or press click it and press `Enter` to see an input that allows you to change the cell value. Once you are done, press `Enter` again or click away to save the new value.\nDelete records from a table\n[](#delete-records-from-a-table)\n`Right Click` on the Record and select `Delete Record` to delete a record from a table.\nOperations on Tables - via Cards\n[](#operations-on-tables---via-cards)\nCheck out the [Table Cards documentation](../docs/table-cards) to learn more about operations with cards.\nOperations on Tables - via Botpress Client\n[](#operations-on-tables---via-botpress-client)\nYou can also interact with tables using the Botpress Client. Here are some of the functions you can use to interact with tables:\nlistTables\n[](#listtables)\nTo list all the tables in the bot, use the `listTables` function. This function will return an array of all the tables in the bot.\nJavaScript\n`try {\nconst tables = await client.listTables({})\nconsole.log('Tables:', tables)\n} catch (err) {\nconsole.error('Error fetching tables', err)\n}\n`\nCreate Table Rows\n[](#create-table-rows)\nExecute the following query to create one or multiple rows. The response will include the inserted rows, along with any encountered errors or warnings during the operation (e.g., unrecognized fields)\nJavaScript\n`const { rows, errors, warnings } = await client.createTableRows({\ntable: 'Data1Table',\nrows: [\n{\nname: 'test'\n}\n]\n})\n`\nFind & Filter Table Rows\n[](#find--filter-table-rows)\nTo find and filter rows in a table, use the `findTableRows` function. You can specify the limit (number of records to return) and the offset (number of rows to start from).\nJavaScript\n`const { rows, limit, offset, count } = await client.findTableRows({\ntable: 'Data1Table',\nlimit: 50,\noffset: 0,\nfilter: {},\norderBy: 'row_id',\norderDirection: 'asc'\n})\n`\nUtilize filters to conduct more refined queries for specific rows, employing a MongoDB-like syntax. The query builder aids in understanding available operations and constructing the filter.\nJavaScript\n`const { rows, limit, offset, count } = await client.findTableRows({\ntable: 'Data1Table',\nfilter: {\n// Retrieve rows where date is greater than a specific date\nupdatedAt: { gte: '2024-01-01' },\n// Or more complex conditions, such as name starting with 'a' or 'b', or 'isActive' being true\n$or: [{ name: { $regex: '^a' } }, { name: { $regex: '^b' } }, { isActive: true }]\n}\n})\n`\nThe \"search\" property allows for a partial text search across the table. The query returns multiple results, each accompanied by a similarity score to indicate relevance.\nJavaScript\n`const { rows, limit, offset, count } = await client.findTableRows({\ntable: 'Data1Table',\nsearch: 'John Doe'\n})\n`\nProjection & Aggregation\n[](#projection--aggregation)\nEmploy the group property for projections and aggregations. The following example demonstrates returning a single row with requested data.\nJavaScript\n`const { rows } = await client.findTableRows({\ntable: 'Data1Table',\ngroup: {\nid: 'count',\nname: ['unique', 'count'], // will return a list of unique values & the total count\nupdatedAt: ['min', 'max'] // Retrieves the earliest and latest date\n}\n})\n// Output variables are named after the field, suffixed with the operation\nconst oldestChange = rows[0].updatedAtMin\nconst mostRecentChange = rows[0].updatedAtMax\nconst count = rows[0]['nameCount']\nconst uniqueValues = rows[0]['nameUnique']\n`\n| Column    | Type   | Key | Count | Sum | Avg | Max | Min | Unique |\n| --------- | ------ | --- | ----- | --- | --- | --- | --- | ------ |\n| id        | number | ✔  | ✔    | ✔  | ✔  | ✔  | ✔  | ✔     |\n| createdAt | date   | ✔  | ✔    | ✔  | ✔  |     |     |        |\n| updatedAt | date   | ✔  | ✔    | ✔  | ✔  |     |     |        |\n| name      | string | ✔  | ✔    | ✔  | ✔  |     |     |        |\n**Key**: Projections are grouped by keys (ex: date)\n**Count**: Returns the total number of non-null values\n**sum**: Returns the sum of all values\n**Avg**: Returns the average of all values\n**Max**: Returns the maximum value\n**Min**: Returns the minimum value\n**Unique**: Returns a list of unique values\nProviding one or multiple keys yields more specific results.\nJavaScript\n`const { rows } = await client.findTableRows({\ntable: 'Data1Table',\ngroup: {\nsomeField: 'key', // Either provide a single operation\nsomeNumber: ['avg', 'sum'] // Or multiple operations\n}\n})\n// Returns multiple rows for each unique combination of keys\nconst result = rows.map((row) => {\nconst { someFieldKey, someNumberAvg, someNumberSum } = row\n})\n`\nUpdate Table Rows\n[](#update-table-rows)\nThis operation updates rows based solely on their numeric IDs.\nJavaScript\n`const { rows, errors, warnings } = await client.updateTableRows({\ntable: 'Data1Table',\nrows: [\n{\nid: 1,\nname: 'test'\n}\n]\n})\n`\nDelete Table Rows\n[](#delete-table-rows)\nRows can be deleted from a table in three distinct manners, each mutually exclusive.\nBy specifying row IDs\nBy applying a filter\nBy removing all rows\nJavaScript\n`const { deletedRows } = await client.deleteTableRows({\ntable: 'Data1Table',\n// Specify a list of IDs\nids: [1, 2, 3],\n// Or use a filter (caution: all rows matching the filter will be deleted. It's advisable to first test with the findTableRows query)\nfilter: { name: 'John Doe' },\n// Deletes every row within this table, irreversible action\ndeleteAllRows: true\n})\n`\nUpsert Table Rows\n[](#upsert-table-rows)\nThe upsert operation is a combination of insert and update, allowing you to insert new rows or update existing ones. The operation is based on the row's ID.\n**keyColumn**: The column used to identify the row. This column must be unique. Failure occurs if more than one row is found for the same key.\nJavaScript\n`const { rows, inserted, updated, errors, warnings } = await client.upsertTableRows({\ntable: 'Data1Table',\nkeyColumn: 'id',\nrows: [\n{\nname: 'test'\n}\n]\n})\n`\nCreate Table\n[](#create-table)\nTo create a table, simply provide a name and a schema. The naming convention follows the same rules as those applied within the studio. Initially, the schema can be empty and populated or modified later. The schema accepts either an example object, from which it will infer the structure, or a directly provided JSON schema.\nJavaScript\n`const { table } = await client.createTable({\nname: 'Data1Table',\nschema: {\nname: 'test'\n}\n})\n`\nExample using a JSON schema. A field marked as 'searchable' will be indexed, enhancing its availability for search queries. Note, 'index' is a system-managed, read-only attribute.\nJavaScript\n`const { table } = await client.createTable({\nname: 'Data1Table',\nschema: {\ntype: 'object',\n'x-zui': {},\nproperties: {\nname: {\ntype: 'string',\n'x-zui': {\nindex: 0,\nsearchable: true\n},\nnullable: true\n}\n},\nadditionalProperties: true\n}\n})\n`\nUpdate Table\n[](#update-table)\nYou can update a table's name, schema, or both. Providing only one of these attributes is also permissible. Should you alter the type of an existing column, be advised that all its entries will default to NULL.\nAdding a new field\n[](#adding-a-new-field)\nJavaScript\n`const { table } = await client.updateTable({\ntable: 'Data1Table',\nschema: {\nmyNewField: 'abc', // Direct value assignment\n// Or specify with a JSON schema\nmyNewField: { type: 'string' }\n}\n})\n`\nRemoving an existing field:\n[](#removing-an-existing-field)\nJavaScript\n`const { table } = await client.updateTable({\ntable: 'Data1Table',\nschema: {\nmyOldField: null // Field removal\n}\n})\n`\nRenaming the table:\n[](#renaming-the-table)\nJavaScript\n`await client.updateTable({ table: 'Data1Table', name: 'myNewTable' })\n`\nRename Table Column:\n[](#rename-table-column)\nTo rename a table column, specify both the current and new names. The column's data type and attributes will remain unchanged.\nJavaScript\n`const { table } = await client.renameTableColumn({\ntable: 'Data1Table',\nname: 'My Old Column Name',\nnewName: 'New Column Name'\n})\n`\nGet Table\n[](#get-table)\nTo retrieve a table's schema, use the `getTable` function. This will return the table's name and schema.\nJavaScript\n`const { table } = await client.getTable({ table: 'Data1Table' })\n`\nDelete Table\n[](#delete-table)\nTo delete a table, use the `deleteTable` function. This will permanently remove the table and all its records.\nJavaScript\n`const { table } = await client.deleteTable({ table: 'Data1Table' })\n`\nOperations on Tables - via Code\n[](#operations-on-tables---via-code)\n![](https://files.readme.io/4d2b9a4-image.png)\ncreateRecord\n[](#createrecord)\nTo create a new record in a table, use the `createRecord` function. You can specify the values for each field in the record. This function can be particularly useful when you need to store new information, such as a new user's details or a newly completed transaction.\nJavaScript\n`// Create a record in the table\nawait Data1Table.createRecord({ Age: 25, Name: 'Tom', Occupation: 'Student' })\n`\ncreateRecords\n[](#createrecords)\nTo create multiple records in a table, use the `createRecords` function. You can specify the values for each field in the record. Useful for creating multiple records at once.\nJavascript\n`// Creating two records in the table\nawait Data1Table.createRecords([\n{ Name: 'Tom', Age: 25, Occupation: 'Student', 'Is Friendly': true },\n{ Name: 'Didier', Age: 54, Occupation: 'Pilot', 'Is Friendly': true },\n])\n`\ndeleteRecord\n[](#deleterecord)\nTo delete a record in a table, use the `deleteRecord` function. You need to specify the record ID of the record you want to delete.\nJavaScript\n`// Delete a record in the table at record ID 7\nawait Data1Table.deleteRecord(7)\n`\ndeleteRecords\n[](#deleterecords)\nTo delete multiple records in a table, use the `deleteRecords` function. You need to specify the record IDs of the records you want to delete in an array.\nJavascript\n` // Delete records in the table at record IDs 7, 8, 9\nawait Data1Table.deleteRecords([7, 8, 9])\n`\nfindRecords\n[](#findrecords)\nTo find records in a table, use the `findRecords` function. You can add filters, just query everything or search using semantic search (like a Google Search!).\nBasic usage and pagination\n[](#basic-usage-and-pagination)\nTo retrieve data from a table in Botpress, you can use the `findRecords` function. This function allows you to specify the limit (number of records to return) and the offset (number of rows to start from).\nFor instance, if you want the first 10 records, you can set the limit to 10 and the offset to 0\\. To fetch the next 10 records, you can set the limit to 10 and the offset to 10.\nTo determine if there are more records available, you can check the length of the array returned. If the length is greater than 0, it indicates the presence of additional records.\nHere's an example:\nJavaScript\n`` const limit = 10\nconst startRow = 0\nworkflow.records = await DataTable1.findRecords({\nlimit,\noffset: startRow,\n})\n// Checking the second page\nconst secondPage = await Data1Table.findRecords({\nlimit,\nfilter: AI`everything`,\noffset: startRow + limit,\n})\nworkflow.hasNextPage = secondPage.length > 0 // This flag can be consumed in your bot flow to handle pagination\n``\nYou can apply a similar approach to determine if there are previous pages as well.\nSearching fields with natural language\n[](#searching-fields-with-natural-language)\nTo perform a traditional search, use the search parameter when calling the DataTable1.findRecords() function in Botpress. Here is an example:\nJavaScript\n`workflow.records = await DataTable1.findRecords({ search: 'red velvet chairs' })\n`\nYou can pass variables like event.preview to the search parameter to search for user input or any other variable. This allows you to preprocess the user's input before performing the search.\nFiltering results\n[](#filtering-results)\nYou can filter results using filters. Similar to MongoDB, this code provides methods to filter results. The filtering mechanism can be divided into two main categories: Primitive and Logical.\nDon't want to deal with code? Skip to the [next section](#using-ai-to-generate-filters) for AI generated filters.\n**Primitive Filter**\n[](#primitive-filter)\nPrimitive filters are easy and simple to use, allowing you to match the exact values you are looking for. Here are some of the primitives you can use:\n* `$eq`: Matches values that are equal to a specified value.\n`{ \"name\": { \"$eq\": \"John\" } }\n`\n* `$gt`: Matches values that are greater than a specified value.\n`{ \"age\": { \"$gt\": 20 } }\n`\n* `$gte`: Matches values that are greater than or equal to a specified value.\n`{ \"age\": { \"$gte\": 20 } }\n`\n* `$lt`: Matches values that are less than a specified value.\n`{ \"age\": { \"$lt\": 20 } }\n`\n* `$lte`: Matches values that are less than or equal to a specified value.\n`{ \"age\": { \"$lte\": 20 } }\n`\n* `$ne`: Matches all values that are not equal to a specified value.\n`{ \"name\": { \"$ne\": \"John\" } }\n`\n* `$in`: Matches any of the values specified in an array.\n`{ \"name\": { \"$in\": [\"Alice\", \"Bob\", \"John\"] } }\n`\n* `$nin`: Matches none of the values specified in an array.\n`{ \"name\": { \"$nin\": [\"Alice\", \"Bob\", \"John\"] } }\n`\n* `$exists`: Matches documents that have the specified field.\n`{ \"name\": { \"$exists\": true } }\n`\n* `$mod`: Performs modulo operation on the value of field and matches documents where field % divisor equals the specified remainder.\n`{ \"qty\": { \"$mod\": [4, 0] } }\n`\n* `$size`: Matches any document where an array field contains a specified number of elements.\n`{ \"tags\": { \"$size\": 3 } }\n`\n* `$regex`: Provides regular expression capabilities for pattern matching strings in queries. It uses a placeholder to prevent SQL injections.\n`{ \"name\": { \"$regex\": \"[a-z]\" } }\n`\n* `$options`: Modifies the `$regex` operator to enable options. Currently, there are two options, 'i' for case insensitive and 'c' for case sensitive.\n`{ \"name\": { \"$regex\": \"[a-z]\", \"$options\": 'i' } } // case insensitive\n{ \"name\": { \"$regex\": \"[a-z]\", \"$options\": 'c' } } // case sensitive\n`\n**Logical Filter**\n[](#logical-filter)\nLogical operators allow you to connect more filtering clauses.\n* `$and`: Joins query clauses with a logical AND. Returns all documents that match the conditions of both clauses.\n`{ \"$and\": [{ \"price\": { \"$ne\": 1.99 } }, { \"price\": { \"$exists\": true } }] }\n`\n* `$or`: Joins query clauses with a logical OR. Returns all documents that match the conditions of either clause.\n`{ \"$or\": [{ \"price\": { \"$eq\": 1.99 } }, { \"price\": { \"$exists\": false } }] }\n`\n* `$not`: Inverts the effect of a query expression and returns documents that do not match the query expression.\n`{ \"$not\": { \"price\": { \"$eq\": 1.99 } } }\n`\nPlease note that these filters and operators can be used together to create complex queries to exactly fit your needs. You can also nest filters like so :\nJavaScript\n`{\n\"$and\": [\n{ \"price\": { \"$lte\": 19.99 }},\n{ \"$or\":  [\n{\"category\": { \"$eq\": \"Shoes\" }},\n{\"category\": { \"$eq\": \"Hats\"}}\n]\n}\n]\n}\n`\nUsing AI to generate filters\n[](#using-ai-to-generate-filters)\nThankfully, Botpress comes with artificial intelligence (AI) capabilities when it comes to filtering records. This means you can provide a human-like query, and the AI will intelligently decipher it and create the right filters for your query.\nThis can significantly simplify the construction of complex queries and reduce the likelihood of human errors in the process.\nJavaScript\n`` const leads = await LeadsTable.findRecords({\nfilter: AI`works either at ${workflow.company} OR is not in IT`,\nlimit: 10,\noffset: 0,\n})\n``\nThe query is written inside the backticks (\\`) that come after \\`filter: AI\\`. The AI expects a query string, and that's why backticks are used.\nRe-using filters (selectors)\n[](#re-using-filters-selectors)\nSelectors are filters that you can re-use. They don't have to be written again and again.\nFor example, you might use the query selector \"People with age greater than 18\" to find all users who are above 18.\n1. Create a query selector in the table and give it a name. (e.g. adults)\n2. Add query as `People with age greater than 18`\n3. use below code to find records and save it in a variable called `adults`\nJavaScript\n`// Find records in the table\nconst data = await Data1Table.findRecords({ selectorName: 'adults' })\nworkflow.adults = data\n`\nDifference between search and AI filters\n[](#difference-between-search-and-ai-filters)\nA standard `Search` in Botpress is employed to identify specific strings like a user's name. It gives precision-based results by matching specific sets of characters.\nOn the other hand, an `AI Filter` broadens the scope and is used primarily for filtering results rather than explicitly searching them. It helps you track down users based on certain criteria, such as age above 25.\nAlthough the AI Filter is not primarily designed for exact string hunting, it's flexible enough to allow it. For instance, you could use it to filter results for `Canada` as a country.\ngetRecord\n[](#getrecord)\nYou can use the `getRecord` function to retrieve a specific record from a table based on a unique identifier. For example, you might use the `getRecord` function to retrieve a user's profile information based on their unique user ID.\nJavascript\n`// 1 is the record ID and User is the variable name\nworkflow.User = data\n`\nupdateRecord\n[](#updaterecord)\nYou can use the `updateRecord` function to modify a specific record in a table. This will be useful when you need to update a specific field in the record. For example, you might use this function to update a user's profile information or to update the status of a transaction.\nJavaScript\n`// Update at record ID 8's Age to 45\nawait Data1Table.updateRecord(8, { Age: 45 })\n`\nupsertRecords\n[](#upsertrecords)\nThe `upsertRecords` function allows you to update or create records in a table in a single operation. It is useful for any situation where you need to update or insert data into a table without having to worry about whether the rows already exist.\n**Example:**\nJavaScript\n`// Update the name and address of the records with IDs 1 and 2.\nawait CustomersTable.upsertRecords('id', [\n{ id: 1, name: 'John Doe', address: '123 Main Street' },\n{ id: 2, name: 'Jane Doe', address: '456 Elm Street' },\n])\n`\nThis code will upsert the records into the CustomersTable. If the records with IDs 1 and 2 already exist in the table, the function will update the existing rows with the new name and address values. If the records with IDs 1 and 2 don't already exist in the table, the function will insert new rows into the table with the new name and address values.\nComputed Columns\n[](#computed-columns)\nColumns can be marked as \"Computed\" which allows the bot builder to observe changes in tables and generate computed values. This includes leveraging AI, as well as running code. This can be useful for a wide variety of use cases such as CRM enrichment, sentiment analysis, classification.\nTo use computed columns, simply create a column and toggle the **Computed** field as shown below.\n![](https://files.readme.io/9e0fcf39902935effd54aada7fbd08541413a97524fd4bfddbfba14767682abc-image.png)\nSelecting the basis of computation\n[](#selecting-the-basis-of-computation)\nTo compute columns, you must select what information you will base your computed columns on. To do so, click the **Dependencies** field and select all column names that you will use.\n![](https://files.readme.io/d12ec2ef7bca25fcf93d352f21a6c04367cdcc698e94c1ef075e312a7d44b250-image.png)\nIn the above example, we selected a column called **number**.\nAI-based computed columns\n[](#ai-based-computed-columns)\nYou can perform AI text generation tasks by filling the prompt and including rows like this {{propertyName}}.\n`Come up with the title for a story like the three little pigs for the number {{number}}\n`\nIn the above example, for the number 3, you might get \"The Three Clever Squirrels\" as a value in the cell.\nCode-based computed columns\n[](#code-based-computed-columns)\nTo run arbitrary code, select the **Execute code** tab. Then, click **Edit Code**.\n![](https://files.readme.io/b242c110986b59376f21e75c4599101299641fd90e353e75a1e6bff1b1e06681-image.png)\nYou will see a window with a code editor.\n![](https://files.readme.io/24d2a3f6ef6fed42ddce8db549e1f5c59c9f74a18659f9cc59b3e4473ce2384c-image.png)\nSimply add your code above. The proper syntax for accessing columns you've identified as dependencies is row\\[propertyName\\], and what is displayed as the cell value is what is returned by this function. You can call asynchronous functions within the function, and have the **axios** library available to perform HTTP requests.\nFor instance, the following code will return the fibonacci number of the row value for the column **number**.\njs\n`function fibonacci(n) {\nif (n <= 1) {\nreturn n\n}\nreturn fibonacci(n - 1) + fibonacci(n - 2)\n}\nif (!row.number) {\nreturn 0;\n}\nreturn fibonacci(row.number)\n`\nThere is currently an execution timeout of 2 minutes these.\nUpdating computed values\n[](#updating-computed-values)\nTo ensure computed values are always kept up to date, we recommend **Auto-compute** be toggled on.\n![](https://files.readme.io/9706d5aa10d\n<|end_input|>\n\nAnswer with this following format:\n```\n■is_about_animals:【explanation (where \"explanation\" is answering the question \"is the text about animals?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_lua_code:【explanation (where \"explanation\" is answering the question \"does the text contain Lua code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_python_code:【explanation (where \"explanation\" is answering the question \"does the text contain Python code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■contains_js_code:【explanation (where \"explanation\" is answering the question \"does the text contain JavaScript code?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■is_botpress:【explanation (where \"explanation\" is answering the question \"is the text about Botpress?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■is_rasa:【explanation (where \"explanation\" is answering the question \"is the text about Rasa?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_flows:【explanation (where \"explanation\" is answering the question \"does the text mention flows?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_api:【explanation (where \"explanation\" is answering the question \"does the text mention the Botpress API?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_enterprise:【explanation (where \"explanation\" is answering the question \"does the text mention Botpress Enterprise?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_workspaces:【explanation (where \"explanation\" is answering the question \"does the text mention workspaces?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_webchat:【explanation (where \"explanation\" is answering the question \"does the text mention the Webchat?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n\n■has_hitl:【explanation (where \"explanation\" is answering the question \"does the text mention HITL (human in the loop)?\")】:x■ (where x is ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES)\n■END■\n```\n\nFormat cheatsheet:\n```\n■label:【explanation】:x■\n```\n\nWhere `x` is one of the following: ABSOLUTELY_NOT | PROBABLY_NOT | AMBIGUOUS | PROBABLY_YES | ABSOLUTELY_YES\n\nRemember: In your `explanation`, please refer to the Expert Examples # (and quote them) that are relevant to ground your decision-making process.\nThe Expert Examples are there to help you make your decision. They have been provided by experts in the field and their answers (and reasoning) are considered the ground truth and should be used as a reference to make your decision when applicable.\nFor example, you can say: \"According to Expert Example #1, ...\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.label","promptSource":"zai:zai.label:default"},"model":"fast","signal":{},"stopSequences":["■END■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■is_about_animals:【The text is a technical documentation about Botpress features, tables, APIs, and integrations; there is no mention of animals at all. According to Expert Example #1, absence of any animal‑related terms leads to an absolute negative.】:ABSOLUTELY_NOT■

■contains_lua_code:【The document only contains Markdown headings, descriptive text, and several JavaScript code snippets. No Lua syntax (e.g., `function`, `end`, or `.lua` files) appears. Following Expert Example #2, lack of Lua code yields an absolute negative.】:ABSOLUTELY_NOT■

■contains_python_code:【All code examples are explicitly labeled “JavaScript” and use JavaScript syntax (`await`, `const`, etc.). No Python code (`def`, `import`, etc.) is present. By Expert Example #3, this results in an absolute negative.】:ABSOLUTELY_NOT■

■contains_js_code:【Multiple sections are headed “JavaScript” and contain valid JavaScript code blocks (e.g., `const tables = await client.listTables({})`). This clearly satisfies the condition. Expert Example #4 confirms such explicit language leads to an absolute positive.】:ABSOLUTELY_YES■

■is_botpress:【The entire content describes Botpress documentation – sections like “Botpress APIs”, “Webchat”, “Integrations”, and “Tables” are all Botpress‑specific. Expert Example #5 states that direct reference to the product name equals an absolute yes.】:ABSOLUTELY_YES■

■is_rasa:【No mention of Rasa, its terminology, or its components appears in the text. Following Expert Example #6, the absence of any Rasa reference yields an absolute negative.】:ABSOLUTELY_NOT■

■has_flows:【The navigation includes “Flow Logic” under both “Cards” and “Webchat”, indicating that flows are discussed. Expert Example #7 notes that any explicit mention of “flow” or “flow logic” counts as a positive.】:ABSOLUTELY_YES■

■has_api:【A dedicated “Botpress APIs” section lists “Files API” and “Chat API”, and later code examples call `client.listTables`, `client.createTableRows`, etc. Expert Example #8 confirms that mentioning API endpoints leads to an absolute yes.】:ABSOLUTELY_YES■

■has_enterprise:【The document talks about free‑plan limits but never references “Botpress Enterprise” or any enterprise‑specific features. According to Expert Example #9, lack of the enterprise keyword results in an absolute negative.】:ABSOLUTELY_NOT■

■has_workspaces:【The term “workspaces” does not appear anywhere in the text. Expert Example #10 states that if a term is absent, the answer is absolutely not.】:ABSOLUTELY_NOT■

■has_webchat:【Multiple sections are titled “Webchat”, “Webchat v1”, “Webchat v2”, and contain related configuration guidance. Expert Example #11 indicates that explicit naming of a feature yields an absolute yes.】:ABSOLUTELY_YES■

■has_hitl:【Under “integrations” the entry “HITL” is listed, and later “Connect a live agent platform with Botpress” references HITL. Expert Example #12 confirms that mention of HITL qualifies as an absolute positive.】:ABSOLUTELY_YES■