How to provide limited history to OpenAI API

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.


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