Skip to content

Guide

Requirements

  • PHP 7.4+
  • [021] ChatGPT Framework ^1.5
  • XenForo 2.2 / 2.3
    • Use version 1.0 for XenForo 2.2
    • Use version 2.0 for XenForo 2.3

Installation & Setup Guide

Installation

  1. Install the Add-on:
    • Upload the files to the server manually, or use the “Install from archive” option in the Admin Control Panel.
  2. Set Permissions:
    • Navigate to the permissions for the Registered group or any other group you want to grant access.
    • Locate the permission group labeled [021] AI Bots and assign the appropriate permissions.

Bot Setup

  1. Create a Bot User:
    • If not already done, create a new user that will act as the bot.
  2. Add the Bot:
    • In the Admin Control Panel, go to Setup → AI Bots → Add Bot (/admin.php?ai-bots/add).
    • Enter the username of the bot user you created.
  3. Configure Bot Settings:
    • Go to the Tuning tab to set up prompts for different contexts where the bot will be active.
    • In the Restrictions tab, specify the groups and forums in which the bot can operate.
    • Visit the Triggers tab to select active contexts and configure triggers that will prompt the bot to respond.

Tuning

This tab is only active for the ChatGPT handler.

In this tab, you can set up prompts for bots in different contexts: conversations, threads, or nodes. The explanation for these fields contains all the necessary information to help compose prompts.

The context for the bot is also configured here – it's the number of messages that were before the message to which the bot responds, which will be available to the bot when generating a response. The smaller the context, the more the answer matches the prompt.

Smart ignore: an option that adds an extra prompt that allows messages to be ignored unless they are directed to a bot.

Restrictions

Here you can set global limits for the bot: groups for which it is active, nodes in which it is active, the maximum number of replies per thread / conversation, and so on. These restrictions are designed to quickly set up a bot and work in conjunction with permissions. They are global. What does it mean? Let's take a look at an example: The "Max replies per thread" option is set to 5. The user accessing the bot has the "Max replies per thread" permission set to 10. When a user tries to contact a bot in a thread that already has 5 posts from the bot, it will be ignored. If you disable the global limit, then the user will be ignored only after the bot has answered him 10 times in person. This is how all other permissions work.

Triggers

There are two settings on this tab, Regexes and Ignore regexes, which may not be clear to non-development users.

The Regexes setting defines additional triggers for the bot's reaction, in addition to the standard mentions and quotes. For example, in order for the bot to respond to messages containing the text "I want to get X images", you will need the following regular expression: /i\s+want\s+\d+\s+images/si.

You can ask ChatGPT to compose a regular expression with the prompt: Please make regular expression for message that can contains "I want X images". It should ignore case and take into account that the given phrase may be part of other text.

The Ignore regexes field works the other way around - it allows you to configure ignoring a message that contains certain text. For example, in order for a bot to ignore messages containing /nobots, you would need the following regular expression: /\/nobots/si

GPT DALL·E

This handler returns a default message in case of successful image generation, otherwise it generates a recommendation where similar images can be found. Successful generation message can be changed in this phrase: bs_aib_gpt_dalle_give_message The names of attachments attached to the message are generated using the phrase bs_aib_image_filename_x. In this phrase, the following variables are available to you: {prompt}: prompt based on which the image was generated. {key}: generated image index.

  • Permissions: Explore the permissions available for the AI Bots add-on.