dotneet / smart-chatbot-ui

An open source ChatGPT UI.
https://smart-chatbot-ui.vercel.app/
MIT License
475 stars 98 forks source link

Reduce costs by limiting to only past 2 messages from history #84

Open ofirkris opened 1 year ago

ofirkris commented 1 year ago

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?

fbaptista commented 1 year ago

If you want to avoid sending the entire context, what about just starting a new conversation?