Open-Assistant
Open-Assistant copied to clipboard
Create UI for messages API endpoints (user + global message-tree views)
Backend message API endpoints are now available (see your local docs while the backend is runnnig):
/messages: by global message id (uuid)
/users/{user_id}/messages: by global user id (uuid)
/frontend_messages: by frontend message id
/frontend_users/{username}/messages: by frontend user name (auth_method will be added here)
Several query options are available.
We want to offer the following views:
- allow users to view specifically messages they submitted
- offer inspection for all messages in the system
There are potentially MANY messages in the system, therefore we primarily select by date range or username prefix, e.g. to page through /messages endpoint:
- user selects a base date (or begin of messages) + limit (max 1000) messages to retrieve + only_roots bool (optional)
- if user clicks next send a new query with base date set to the
created_dateof the last message received by the previous call (date is currently missing in the messages model, will be added soon)
As soon as a single message is selected the corresponding conversation or message tree can be retrieved, e.g.:
/api/v1/messages/{message_id}/tree/api/v1/messages/{message_id}/conversation
There are additional endpoints to select the longest conversation in a tree (/api/v1/messages/{message_id}/longest_conversation_in_tree) and the message with the most children.
@fozziethebeat will generate additional issues for this (and other admin interface parts).
I'll probably turn this into a milestone and a variety of more specific feature request issues.
Still drafting what that will all look like.
I'm marking this as documentation and closing it. I've created a milestone regarding messages and broke this down in to three smaller issues. There's likely more to add in as we explore.