-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Add POST /api/conversations/{id}/message endpoint #11177
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
Conversation
- Added new endpoint to add messages to existing conversations - Takes JSON body with 'message' field containing text content - Creates MessageAction and sends to conversation via conversation_manager - Returns success/error response with proper HTTP status codes - Added comprehensive test coverage for success and error cases - Follows existing patterns from /events endpoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like
Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
@OpenHands fix the tests
|
I'm on it! rbren can track my progress at all-hands.dev |
The tests were expecting message content to be directly in message_data['content'], but the actual implementation uses event_to_dict() which puts the content in message_data['args']['content']. Updated test assertions to match the actual data structure returned by the MessageAction serialization. Co-authored-by: openhands <openhands@all-hands.dev>
SummaryI successfully fixed the failing tests for the Issue AnalysisThe two failing tests ( Root CauseAfter examining the implementation, I discovered that the Changes MadeI made minimal, targeted fixes to the test assertions:
Verification
The tests now correctly validate the actual data structure returned by the |
Feature deployment is available at: https://ohpr-11177.staging.all-hands.dev |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
Feature deployment is available at: https://ohpr-11177.staging.all-hands.dev |
Co-authored-by: openhands <openhands@all-hands.dev>
Summary
This PR adds a new API endpoint
POST /api/conversations/{id}/message
that allows adding messages to existing conversations.Confirmed working locally!
To run this PR locally, use the following command:
GUI with Docker:
CLI with uvx: