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

Remove participants from ConversationType #1883

Closed
spolu opened this issue Sep 29, 2023 · 3 comments
Closed

Remove participants from ConversationType #1883

spolu opened this issue Sep 29, 2023 · 3 comments
Assignees

Comments

@spolu
Copy link
Contributor

spolu commented Sep 29, 2023

The list of participants is currently computed server side in lib/api but really it can be computed from the conversation so it should not exist on the ConversationType as it does not bring any new capability, it's just a convenience for our product to have it here.

Let's either move its computation fully client-side or create separate endpoints to compute them and have access to them. Both are fine.

@spolu spolu assigned spolu and PopDaph and unassigned spolu Sep 29, 2023
@PopDaph
Copy link
Contributor

PopDaph commented Oct 3, 2023

@spolu was about to start this task but I have a second thought.

There is no additional query to fetch the list of participant, we just take advantage of a loop on messages in getConversation to fill the list of participants, and return them: https://github.com/dust-tt/dust/blob/main/front/lib/api/assistant/conversation.ts#L404

So I think we shouldn't change the way it's done. OK for you?

@spolu
Copy link
Contributor Author

spolu commented Oct 3, 2023

Well the only tension is for the public API this field really is not needed. What is the rationale for keeping it server-side versus moving the logic client-side? The rationale I see for doing it is simplifying the object we return from GET /.../conversations/[cId]

@PopDaph
Copy link
Contributor

PopDaph commented Oct 3, 2023

#1935 🙇🏻‍♀️

@PopDaph PopDaph closed this as completed Oct 3, 2023
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

No branches or pull requests

2 participants