Open RostyslavManko opened 4 months ago
I have made progress in completing this task. I have created a code to detect and display an error message if the user's last message exceeds the Chunk Size: https://github.com/Hacker-GPT/HackerGPT-2.0/pull/347. Now, we need to work on creating an AI error message that will not be saved in the chat history. It will continue to display until the user decides to regenerate the response with a shorter message or if the user reloads the page, which will remove the message with the error entirely.
Description
To improve user experience and ensure AI understands the conversation better, we need to display an error message in the form of an AI response when the user's last message is longer than the CHUNK_SIZE for a specific model. This error message should be deleted from the chat history in the future to avoid confusion and maintain context for the AI.
Objective
Our goal is to implement a feature that displays an error message when the user's last message exceeds the CHUNK_SIZE limit and automatically removes the error message from the chat history in the future.
Actions and Considerations (ACC)
Detect Exceeded CHUNK_SIZE:
Display Error Message:
Remove Error Message from Chat History:
Testing and Quality Assurance:
Expected Outcomes