# How to provide limited history to OpenAI API

**URL:** <https://forum.adalo.com/t/how-to-provide-limited-history-to-openai-api/43664>\
**Category:** Get Help\
**Created:** [December 3, 2023, 10:20am UTC](https://forum.adalo.com/t/how-to-provide-limited-history-to-openai-api/43664 "2023-12-03T10:20:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![craig](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/craig/32/32255_2.png) [@craig](https://forum.adalo.com/u/craig)\
**Post date:** [December 3, 2023, 10:20am UTC](https://forum.adalo.com/t/how-to-provide-limited-history-to-openai-api/43664/1 "2023-12-03T10:20:20Z")

</div>

I am unable to figure out a way to provide limited chat history to an OpenAI API post.

I have added a chat conversation (prompt and response) to an input field, but I must either let it grow forever or periodically empty the text. Both options are not sustainable.

I have created a collection of chat, which displays nicely, but I don’t know how to give that to the API.

I can’t be the only experiencing this. Any help would be greatly appreciated.

Craig.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [December 13, 2023, 10:20am UTC](https://forum.adalo.com/t/how-to-provide-limited-history-to-openai-api/43664/2 "2023-12-13T10:20:43Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
