Chatbots – Assistants

Last modified:

Assistants leverage OpenAI's Assistants API to generate responses.

Key features of Assistants include:

  • Stateful Conversations: Assistants remember past interactions, allowing SleekAI to avoid resending the entire conversation context with each request.
  • Files: Assistants can manage up to 10,000 files, ideal for handling large datasets.
  • Static Instruction: As entities on OpenAI's servers, Assistants cannot use dynamic data variables in their initial instructions.

Getting Started

To begin using Assistants, activate the Assistant feature in the Provider tab of your chatbot's settings. Once activated, save your chatbot to create an Assistant associated with it. You will see the Assistant ID upon successful creation.

Files

A new tab labeled Files will now appear in your chatbot's settings, displaying all files associated with your OpenAI account.

Uploading Files

To upload a file, click the Upload a file button. Refer to the supported file formats for more details.

Creating Files

Alternatively, you can also create a .txt file using a WP_Query and automatically upload it to the Assistant. This is useful for utilizing large datasets. Start by clicking the Add dataset button and naming your dataset. This name will also serve as the filename.

Upon selecting the posts you want to include in the dataset, you have to define a template for the dataset. The template is a string that will be used to format the data from the posts. The template can include any of the post's fields using curly braces.

Let's take the following template as an example:


            Title: {post_title}
    Content: {post_content}

      
Copy

This would loop through the selected posts and generates the following content:

Title: Post Title #1
Content: Post Content #1
Title: Post Title #2
Content: Post Content #2
...

After reviewing your selections, click the Review and create file button to preview the complete content in a modal. If satisfied, click Create to finalize the file, which will then appear in the file list at the top of the page.

Finally, select the file by clicking on it (a checkmark will appear) and save your chatbot.