Chatbots – Setup

Last modified:

Chatbots are similar to Chats but can be integrated into any page (admin, frontend, or both) using a user-friendly widget.

For an example, visit the chatbot feature page.

Configuration

To create a new chatbot, navigate to:

/wp-admin/admin.php?page=sleek-ai#/chatbot/new

Edit the placeholder with your site URL, it will be saved for the next time you visit.

Enter a name, and you will be redirected to the chatbot's edit page.

Data

The data for the initial system message is crucial as it serves as instructions for the chatbot's operation.

Sources

Dynamic data can be incorporated into the system message. We currently support the following data sources:

  • Text: A simple text field.
  • Query: A query to the WordPress database.
  • Post title: The title of a post.
  • Post content: The content of a post.
  • Bricks content: The content of a Bricks page. (if Bricks is installed)
  • Elementor content: The content of an Elementor page. (if Elementor is installed)
  • Oxygen content: The content of an Oxygen page. (if Oxygen is installed)
  • Postmeta: Metadata associated with a post.
  • Taxonomy: A post's taxonomy.
  • Term: A term within a taxonomy.
  • User: User data.
  • Usermeta: Metadata associated with a user.

Variable

Data query results are stored in variables. For instance, you could save the title of a post as postTitle. In the system message, you can reference the variable using curly braces: {postTitle}. This will dynamically replace {postTitle} with the actual title of the specified post when the system message is sent.

Meta Keys

For data types like postmeta and usermeta that return an object, you must define a meta-key. This key specifies which object value to retrieve.

For instance, to fetch the current user's email, select the user data source and set the meta-key to data.user_email.

System Message

The system message, which is the first message received by the chatbot, should be a clear instruction to guide its behavior. All previously defined data variables can be included in this message.

Conditions

By default, the chatbot will not appear anywhere. Set conditions to specify where the chatbot should be visible:

  • Is Admin: Displays the chatbot in the admin area.
  • Post Type: Displays the chatbot on pages of a specific post type.
  • Post: Shows the chatbot on specific posts.
  • Post Status: Activates the chatbot on posts with specific statuses.
  • Post Template: Displays the chatbot on pages using a specific template.
  • Taxonomy: Shows the chatbot on pages related to a specific taxonomy.
  • Term: Displays the chatbot for specific terms.
  • User Logged In: Shows the chatbot when a user is logged in.
  • User Role: Restricts the chatbot display to users with specific roles.

Alternatively, you can use the shortcode displayed in the conditions section to render the chatbot anywhere you want.

Security

To prevent exploitation through prompt injections, you can add a closing guideline. This will be appended to the system message ensuring that the chatbot maintains its designated role.

Provider

Find provider-specific settings such as the chatbot's model and temperature here, along with other features like streaming.

You will also find the option to create an assistant from the chatbot.

Widget

Customize the chatbot's launch button in the widget settings. Adjust the button type, text, background color, and other properties.

An option is available to keep the widget open at the bottom of the page permanently, thus keeping the chatbot accessible while you adjust its appearance.