Discourse Chatbot 🤖

Chatbot 1.3 has been released :tada:

  • FEATURE: add option to manage quotas by token
    • new setting chatbot_quota_basis allows you to opt in, otherwise it remains by query number
    • the only difference by default is that the quota counts down from the starting max quota (which is still based on same trust level settings).
  • FEATURE: include cost of API calls like DALL-E in user consumption
    • token basis only
    • various new settings to tweak to influence token cost of API features
  • FEATURE: add function to allow user to check their remaining quota

Chatbot has always included the ability to enforce a usage quota.

Today this becomes more sophisticated!

Chatbot can now track and enforce a quota on usage by token.

You can cost calls to API’s to discourage their over-use, so you can feel less worried about giving people access to picture generation, for example.

Token tracking is opt in. If you change to token tracking, make sure you increase each trust level quota, because the values will need to be a few orders of magnitude greater. Experiment.

However, tracking by query has changed slightly. It will now reset to your maximum allowed number of queries and count down to zero.

You might consider running the global quota reset job once as a one-off to make sure everyone starts with a full quota. This is a one-timer!

In sidekiq at /sidekiq/scheduler:

Hit the trigger button.

In either case users can now ask how much quota they have left:

NB: known issue: if this question is asked for the first time before the reset job has run, the answer might be a bit strange! Regardless of the reset job running, the second time this question is asked it should work fine.

2 Likes