Title: max prompt buffer
Last modified: February 18, 2023

---

# max prompt buffer

 *  Resolved Anonymous User 18191698
 * (@anonymized-18191698)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/max-prompt-buffer/)
 * Hi there Jordy. Any news as to the max_prompt_buffer feature which would let 
   users control the number of tokens used for the buffer?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/max-prompt-buffer/#post-16482557)
 * Hi @ai6667,
 * I am handling this dynamically now, to avoid going over the maximum amount allowed
   by the model. I wanted to see if that works well, and it does.
 * So basically, now you can use the standard max_tokens parameter and that will
   work 🙂
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/max-prompt-buffer/#post-16482560)
 * That said, I have also implemented the fact that only the last 15 questions/answers
   are kept and used in the prompt.
 * That number of 15 could also be changed. I forgot what we said before but in 
   this case now, it could be “conversation_buffer” and 15 by default. What do you
   think?
 *  Thread Starter Anonymous User 18191698
 * (@anonymized-18191698)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/max-prompt-buffer/#post-16482567)
 * Being able to set the max tokens per prompt and inputting only the last 15 sounds
   ok. Although, if the user could change the number in the bot settings, that would
   be ideal. I do have one problem now.
 *  Thread Starter Anonymous User 18191698
 * (@anonymized-18191698)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/max-prompt-buffer/#post-16492970)
 * Hi. Do you think you can add the conversation buffer as a parameter because it
   would be very useful to control this on a per bot basis? For example, sometimes
   one would require no buffer for purely text in /text out jobs such as translation,
   grammar fixing and so on.
 * Thanks
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/max-prompt-buffer/#post-16493599)
 * It’s already in the new version 🙂 Please use it like this:
 *     ```wp-block-code
       [mwai_chat max_sentences="10"]
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘max prompt buffer’ is closed to new replies.

 * ![](https://ps.w.org/ai-engine/assets/icon-256x256.png?rev=3431928)
 * [AI Engine - The Chatbot, AI Framework & MCP for WordPress](https://wordpress.org/plugins/ai-engine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-engine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-engine/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-engine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-engine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-engine/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/max-prompt-buffer/#post-16493599)
 * Status: resolved