Yash-Parsana / CrazyCoderWebApp

Android App: https://github.com/Yash-Parsana/CrazyCoderApp .................... Backend: https://github.com/Yash-Parsana/CrazyCoderServerlessApi
https://crazycoder-eight.vercel.app
17 stars 27 forks source link

💡[FEATURE]: Adding `handleUserResponse` Functionality to Capture User Inputs #88

Open Swapnilden opened 1 week ago

Swapnilden commented 1 week ago

Is your feature request related to a problem? Please describe. I'm always frustrated when the chatbot does not retain user responses for later use in the conversation. This makes it difficult to provide personalized suggestions or follow-up questions based on previous inputs. Currently, the chatbot can ask questions and receive answers, but it lacks the ability to remember these responses and utilize them effectively throughout the interaction.

Describe the solution you'd like I would like to add a handleUserResponse function to the chatbot, which captures and stores user responses during the conversation. This function should:

  1. Store the user's response each time they input an answer.
  2. Allow the chatbot to access previous responses and provide personalized follow-ups or suggestions.
  3. Use React's state management (useState) to maintain a record of all user responses within the component's lifecycle.

Describe alternatives you've considered Using Redux: While Redux could manage state across the entire application, it might be an overkill for a simple chatbot. It introduces additional complexity and requires more boilerplate code. Local Storage: Storing responses in local storage can retain data even after a page refresh, but it might not be ideal for real-time interactions and dynamic updates within a single session. Backend Storage: Sending responses to a backend server for storage and retrieval allows for more complex interactions and persistent storage, but it introduces latency and requires server-side implementation.

Additional context Adding handleUserResponse would enable more dynamic and engaging conversations. For example, if a user mentions they are drawing a landscape, the chatbot could remember this and suggest relevant drawing tips or resources later in the conversation. Please assign me this issue under GSSOC'24 to work on this.