# Discourse Chatbot 🤖

**URL:** https://meta.discourse.org/t/discourse-chatbot/256652
**Category:** Plugin
**Tags:** ai
**Created:** [March 1, 2023, 11:08am UTC](https://meta.discourse.org/t/discourse-chatbot/256652 "2023-03-01T11:08:25Z")
**Posts on this page:** 1
**Showing post:** 981

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [October 22, 2024, 11:56am UTC](https://meta.discourse.org/t/discourse-chatbot/256652/981 "2024-10-22T11:56:40Z")

</div>

**Chatbot 1.3 has been released** 🎉

- 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

[https://github.com/merefield/discourse-chatbot/pull/124](https://github.com/merefield/discourse-chatbot/pull/124)

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`:

 ![This image depicts a software developer's dashboard featuring a table with columns for worker data and a red "Trigger" button in the bottom-right corner. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/5/4/1/541990702a780b4f803e18c556a5497ce3fad6aa.png)

Hit the trigger button.

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

 ![The image shows a screenshot of a text chat, likely between a human and a bot, with a dark gray background and white text. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/c/4/9/c49226dd842ac8ff9ce0f92eb7afe56994844503.png)

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.

---

_[View the full topic](https://meta.discourse.org/t/discourse-chatbot/256652)._
