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

Incomplete Error Handling in chatbot #549

Open
1 task done
0rigin-c0de opened this issue Aug 12, 2023 · 1 comment
Open
1 task done

Incomplete Error Handling in chatbot #549

0rigin-c0de opened this issue Aug 12, 2023 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@0rigin-c0de
Copy link

Describe the bug

API URL: The API URL was specified inside the generateResponse function, but it should be defined globally, just like the API key, to maintain consistency.

Scroll Behavior: The code was missing proper scrolling behavior to ensure the chatbox scrolls to the bottom after sending messages or opening/closing the chatbot. This makes the conversation flow smoother and keeps the latest messages visible.

Error Handling: If there was an error with the API request, it was not handled gracefully. The code needed proper error handling to display a user-friendly error message in the chat.

Code Structure: The code could benefit from a bit of refactoring to improve readability and maintainability.

Expected behaviour

Scrolling: After sending a message, the chatbox should scroll to the bottom to ensure that the latest messages are visible to the user. Additionally, when opening or closing the chatbot, the chatbox should also scroll to the bottom.

Error Handling: If there's an error while making the API request (e.g., API key issue or network error), the chatbot should display an error message in the chat with an "error" style. This error message should indicate that the user should try again.

Screenshots

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@0rigin-c0de 0rigin-c0de added bug Something isn't working invalid This doesn't seem right labels Aug 12, 2023
@github-actions
Copy link

👋 @0rigin-c0de

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.

Please make sure you have given us as much context as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant