You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: