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

Save prompt history #164

Open
lefnire opened this issue Jun 26, 2023 · 0 comments
Open

Save prompt history #164

lefnire opened this issue Jun 26, 2023 · 0 comments
Assignees

Comments

@lefnire
Copy link
Collaborator

lefnire commented Jun 26, 2023

When you chat with Prompt (GPT or #160), the conversation should be persisted to DB so you can revisit. This is especially true of Entry mode (open a single entry modal), it would be easy to save the conversation to the entry. As for List mode (viewing multiple entries, with filters applied) we should save the convo history to DB and there should be a tab in the Prompt modal for viewing prior conversations. The current approach is 0 saving, not even LocalStorage. If you close Prompt and come back, it's a brand new chat. So until we get DB persistence, we should at least have LocalStorage to hold us over.

I think the best way to approach this via the DB schema is Notes. In the past, Notes was intended for things like labeling your entries, though diffusion, CBT, etc. There were 3 types: comment, resource, and label. Going forward into the Groups feature, this whole system will be moved instead to Chat. There aren't note-types, instead there's just a chat field you can just type whatever, under your entry. Same personal benefit, just simpler. Then, if you share the entry with a friend or therapist or Group, they can see that chat and chime in as well - hence "chat". I think I'll still call it "Notes", since that's a more general term and fits with the mental model like Instagram. With this structure, we could remove the Prompt box and instead add a checkbox next to the Notes textfield like "let AI respond", and it chimes into chat like it's someone you shared with; just with a visual indicator that it's the AI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Next
Development

No branches or pull requests

1 participant