smart-chatbot-ui icon indicating copy to clipboard operation
smart-chatbot-ui copied to clipboard

Reduce costs by limiting to only past 2 messages from history

Open ofirkris opened this issue 1 year ago • 1 comments

Currently the entire conversations context is sent to OpenAI API which causes high costs per GPT4 query, how can we limit the context to only last two messages?

ofirkris avatar Jun 16 '23 11:06 ofirkris