Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Error Message for Last User Message Exceeding CHUNK_SIZE #256

Open
1 of 6 tasks
RostyslavManko opened this issue Apr 30, 2024 · 1 comment
Open
1 of 6 tasks
Labels
help wanted Extra attention is needed

Comments

@RostyslavManko
Copy link
Contributor

RostyslavManko commented Apr 30, 2024

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)

  1. Detect Exceeded CHUNK_SIZE:

    • Implement a check to determine if the user's last message is longer than the CHUNK_SIZE for the specific model.
  2. Display Error Message:

    • If the user's last message exceeds the CHUNK_SIZE limit, display an error message in the form of an AI response.
  3. Remove Error Message from Chat History:

    • Implement a mechanism to automatically delete the error message from the chat history in the future to maintain context for the AI.
  4. Testing and Quality Assurance:

    • Conduct thorough testing to ensure that the error message is displayed correctly when the user's last message exceeds the CHUNK_SIZE limit and is removed from the chat history as expected.
    • Test various scenarios, including potential edge cases, to guarantee a robust and reliable solution.
    • Verify that the changes work correctly both locally and on Vercel preview.

Expected Outcomes

  • Improved user experience by providing clear error messages when the user's last message exceeds the CHUNK_SIZE limit.
  • Enhanced AI understanding of the conversation by automatically removing error messages from the chat history.
  • Enhanced overall functionality and adherence to best practices for error handling and chat history management.
@RostyslavManko RostyslavManko converted this from a draft issue Apr 30, 2024
@RostyslavManko RostyslavManko added enhancement New feature or request Frontend labels May 5, 2024
@RostyslavManko RostyslavManko self-assigned this May 26, 2024
@RostyslavManko
Copy link
Contributor Author

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: #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.

@RostyslavManko RostyslavManko removed their assignment May 26, 2024
@RostyslavManko RostyslavManko moved this from Todo to In Progress in HackerAI Board May 28, 2024
@RostyslavManko RostyslavManko added help wanted Extra attention is needed Frontend and removed enhancement New feature or request Frontend labels May 29, 2024
@RostyslavManko RostyslavManko moved this from In Progress to Todo in HackerAI Board May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Status: Todo
Development

No branches or pull requests

1 participant