Skip to main content

Playground Chat

A fully implemented Backend chat, that allows you to test all aspects, provided by the "Assistant Manager", in a real chat, using Saleschannel, Saleschannel Domain, and if available, a separate plugin configuration. It requires an OpenAI API Key and at least one Assistant, associated to that key.

If your account has billing issues like no funds, you will get shown a message in the Backend Chat, received from OpenAI. The Storefront, or practically everything else will retrieve:

"error_5elements_hush_limit"

That's our code word for billing issues.

  • Required, but pre-selected: Saleschannel and Domain.
  • Optional: Load Plugin Config.
    • If a plugin is installed, that uses the Assistant Manager.
    • The Plugin doesn't need to be enabled, just installed.
    • Quick view the configuration in said plugin.
    • A separate plugin is not required to use the chat.
  • Alternative
    • Use any Assistant, associated with the OpenAI API Key used in the Assistant Manager.
    • You can even select a "Plugin Config" first, and select any Assistant available to test the config.
    • "5 Elements Backend Assistant"
      • Your personal Backend Buddy, aka "BaBu".
      • If you don't have already created one, you get asked to create one on the "Main entry page".
      • This Assistant has short instructions, allowing it practically everything to help you with any task.
        • This Assistant can be used to test everything explicitely.
        • Usually with assistants, in order to make an assistant use a tool, you will need to trigger the use in a natural manner, through asking a specific question, means:
          • You can't tell an Assistant in a normal prompt (user input), that it should use tool x, and expect, it will.
          • Assistants use tools based on instructions and, when they think it's appropiate, not on command.
          • BaBu is different, it will help you with any task, as much as it can.
          • It can be used for special tasks, like performance tests, where it is tasked:
            • To call as many tools as it can. Useful for example to make sure, multi tool call works on your Server as expected.
            • Or call a specific tool, just by saying the name of that tool.
            • Each tool, BaBu should call, needs to be enabled for BaBu.
  • If "Chat Logs" are enabled, and an Assistant has threads, that are not deleted by the user (are active), that threads can be resumed with one click, use the "Logged active threads" button right beside the Assistant select element.
    • The Chats loaded belong to the selected Assistant. If an Assistant has no Logs, the button won't appear.

Chat Adaptive Timeout System (5E_OAI_CATS)

The OpenAI Assistants Manager implements an adaptive timeout system that automatically increases wait times between API requests as operations take longer to complete. After every 10 attempts, the system adds 1 second to the current timeout (up to a maximum of 5), balancing responsiveness with efficient API usage.

When the "Wait Time Between Attempts" is set to 2:
- 10 attempts: 3 seconds
- 20 attempts: 4 seconds
- 30 attempts: 5 seconds
- ... (remains at 5 seconds)

That's the defaults for the Chat, and last but not least, Chat Tools. These Tools are just to simplify processes.

Auto chat

For all Assistants, there is an Auto-Chat tool available. I know what you think: "An Auto-Chat?" Yes, especially while developing, it's important to chat as many as possible, just to make sure, everything works as expected, and to identify possible issues, that occurres randomly or just in rare cases. In the last months, i did around 20,000 requests to the OpenAI API. Without that Auto-Chat, it would be 2,000, more likely less.

To run the Auto-Chat, you need a list of questions as plain text. You will need to store the list somewhere on your own, it will not be stored on the server, but temporarily in the localStorage (should keep the list for at least a few days). Here an example, how it could look like (forcing the assistant to use tools like "get_order_status", "product_search" and "get_payment_methods" on the fly):

hello
whats happening with my order?
the number is 10000 and the zip code is 44649?
i'm looking for a red or green cotton T-shirt in size L for men starting at €10.
can I request the pickup code again?
is useful data transmitted encrypted?
what are the payment methods?
theres an offer on the site. Is it still valid? https://www.cake-boutique.ch/Backzutaten/

The Auto-Chat will post the quetions one after another, till they're all done. If the search_logs tool is enabled, it also will pre-fill the table with the questions, the way the assistant has searched for the data in said table.

BaBu "Chat Tools"

The "Chat Tools" are only available, if BaBu is selected as Assistant. The button to open the tools appears on the right of the Auto-Chat button. These are less tools, but extended prompts, that only BaBu can and will perform. And it's also an example, how you can use BaBu for tasks beyond product related tasks. Currently available prompts:

  • Check Product Properties
    • This is just a shortcut for: "Call get_product_properties, what's the content you receive?"
  • Log Assistant Messages
    • This asks BaBu to create a set of questions, set in the "Assistant Logs".
      • If there is already content like a real FAQ available, the generated questions can mirror real user interactions, based on that data.
  • Tools performance test
    • This asks BaBu to conduct a performance test, regarding tool calls, or multi_tool_calls. Multiple tool calls are essential, since it allows Assistants to search for data in very complex ways.