-
Notifications
You must be signed in to change notification settings - Fork 45
LCORE-383: Fix attachments in /conversations #285
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
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This is the other HACKY PR #286 |
I would love feedback from anyone about which direction should be pursued. Thanks! |
We do a lot of cleanup here |
@eranco74 So thats what I originally thought however there really is very little cleanup that actually happens there (at least cleanup that would help with this issue) this is because the attachment is appended to the content. |
Description
This PR is one of 2 that is being proposed to close LCORE-383.
Basically what is happening is that attachment content is being appended to messages when accessing them through the
/conversations
endpoint.This error can be seen below along with what it looks like after the fix.
Before Fix
This is when the attachment is sent before using the


/conversations
endpoint to reload the saved conversation.This is after the
/conversations
endpoint is used to reload the conversation.After Fix
This is when the attachment is sent before using the


/conversations
endpoint to reload the saved conversation.This is after the
/conversations
endpoint is used to reload the conversation.This is what the response of the
/conversations
endpoint looks like:I originally wanted to solve this by leveraging the session data in llama-stack to extract the attachment content, however because we pass the message as a string and not a list of
InterleavedContentItem
's it directly appends the content to the message content string making it difficult to remove.This PR represents solving the issue in a non-hacky way but such that it doesn't fully meet the acceptance criteria of LCORE-383. Basically it just changes how we pass the
content
of theUserMessage
to be a list of content items and not a string.The issue with this however is that we wouldn't have any of the metadata that is passed originally along with the
attachment
.Type of change
Related Tickets & Documents
Checklist before requesting a review
Testing