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

🪨 fix: Formatting Edge Case Handling for Bedrock Messages #4016

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

danny-avila
Copy link
Owner

Summary

Closes #4006

  • Added a check in the formatAgentMessages function to handle cases where message.content is a string, converting it to the expected format to prevent message formatting issues in Bedrock.

Other Changes

  • Removed a console.log statement from the SelectDropDown component in the UI, improving code cleanliness and reducing unnecessary console output.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

Testing

To test these changes:

  1. For the Bedrock fix:

    • Create a conversation using the Bedrock model.
    • Send message as OpenAI, then switch to Bedrock.
    • Verify that all messages are formatted correctly and displayed without issues.
  2. For the UI cleanup:

    • Open the browser console while using the application.
    • Interact with any SelectDropDown components.
    • Confirm that no unnecessary console logs appear related to hasSearchRender or options.

Test Configuration:

  • Bedrock model enabled
  • Latest version of the application running locally or in a test environment

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • I have tested my changes to ensure they work as expected

@danny-avila danny-avila changed the title fix: Formatting Edge Case Handling for Bedrock Messages 🪨 fix: Formatting Edge Case Handling for Bedrock Messages Sep 12, 2024
@danny-avila danny-avila merged commit 9a393be into main Sep 12, 2024
4 checks passed
@danny-avila danny-avila deleted the fix/content-switch branch September 12, 2024 10:06
BertKiv pushed a commit to BertKiv/LibreChat that referenced this pull request Dec 10, 2024
…a#4016)

* refactor: Remove console.log statement in SelectDropDown component

* fix(bedrock): edge case - message.content as string creating message formatting issue
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.

[Bug]: Bedrock: Unhandled error type Iterator value I is not an entry object
1 participant