smart-chatbot-ui
smart-chatbot-ui copied to clipboard
Reduce costs by limiting to only past 2 messages from history
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?