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

🧹 chore: address minor issues #3710

Merged
merged 3 commits into from
Aug 20, 2024
Merged

🧹 chore: address minor issues #3710

merged 3 commits into from
Aug 20, 2024

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented Aug 20, 2024

Summary

  • Added a submitting CSS selector to prevent blinking cursor for empty, non-latest, non-streaming messages, improving the visual consistency of the chat interface.
  • Enhanced error handling in the OpenAIClient's chat completion process to manage scenarios where the response has no choices or the message is undefined.
  • Adjusted the Markdown component to only show the thinking animation for the latest message.

Testing

To test these changes:

  1. Start a new conversation and observe the cursor behavior for messages in different states (latest, non-latest, streaming, non-streaming).
  2. Simulate error scenarios in the OpenAIClient to verify the improved error handling.
  3. Check the console logs for the new debugging statements in various chat completion scenarios.

Test Configuration:

  • Ensure you have the latest dependencies installed.
  • Test with different AI models and conversation lengths to verify consistent behavior.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • I have tested the changes in various scenarios to ensure robustness

Improve error handling in the chat completion process to handle scenarios where the response has no choices or the message is undefined. This ensures that the intermediate reply is returned in such cases. Also, add logging statements for better debugging.
@danny-avila danny-avila changed the title 🧹 chore: rebuild package-lock.json, address minor issues 🧹 chore: address minor issues Aug 20, 2024
@danny-avila danny-avila merged commit 14ddfec into main Aug 20, 2024
4 checks passed
@danny-avila danny-avila deleted the chore/packages branch August 20, 2024 11:00
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Sep 17, 2024
* refactor(OpenAIClient): improve error handling in chat completion

Improve error handling in the chat completion process to handle scenarios where the response has no choices or the message is undefined. This ensures that the intermediate reply is returned in such cases. Also, add logging statements for better debugging.

* refactor(Markdown): only show blinking cursor for latest message

* refactor: add submitting selector to prevent blinking cursor for empty, non-streaming, non-latest messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant