# Limit the number of AI tokens a user can use in a day?

**URL:** <https://meta.discourse.org/t/limit-the-number-of-ai-tokens-a-user-can-use-in-a-day/330500>\
**Category:** Feature\
**Tags:** completed, ai\
**Created:** [October 11, 2024, 8:59pm UTC](https://meta.discourse.org/t/limit-the-number-of-ai-tokens-a-user-can-use-in-a-day/330500 "2024-10-11T20:59:12Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![oppman](https://avatars.discourse-cdn.com/v4/letter/o/aca169/32.png) [@oppman](https://meta.discourse.org/u/oppman)\
**Post date:** [January 17, 2025, 7:01pm UTC](https://meta.discourse.org/t/limit-the-number-of-ai-tokens-a-user-can-use-in-a-day/330500/10 "2025-01-17T19:01:06Z")

</div>

I’m going to assign this configuration to an intern next Wednesday on a self-hosted Discourse site. Do I need to tell them to pull from a main branch on GitHub? Or, if they add this line in `app.yml`, is it sufficient?

```yaml
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          ...
          ...
          - git clone https://github.com/discourse/discourse-ai.git 

```

I want to allow the Discourse AI plugin features to only registered users. Is that the default behavior?

It doesn’t look to me that the AI-enhanced search has per-group control???

 ![This image depicts a series of settings and options in an AI interface related to AI embeddings, including model types, semantic search capabilities, and related topics. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/3/a/5/3a5ea3677af4f15a5f3de1c829b996fcf287dbac.png)

For the AI bot, I’m thinking of setting it to trust 0 and setting a limit on tokens per group, increasing as the trust grows. Is this a good strategy?

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/1/7/1172bd15e596bea146096be92f4a95785f9d46a5.png)

---

_[View the full topic](https://meta.discourse.org/t/limit-the-number-of-ai-tokens-a-user-can-use-in-a-day/330500)._
