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

Question search params doesn't have context after second message/query #71

Open
Extheoisah opened this issue Mar 18, 2024 · 4 comments
Open
Labels
enhancement New feature or request low priority

Comments

@Extheoisah
Copy link
Contributor

This is a follow-up issue to #64
We need to find a way around the question that is appended as search params in the URL. It currently updates to the latest question. So for a chat with the question history below:

  • what are ptlc's?
  • do they have any advantages?

the question in the URL will be "Do they have any advantages" and if that is shared with another user, chat wouldn't know what reply to give.

@Extheoisah Extheoisah added enhancement New feature or request medium priority labels Mar 18, 2024
@rejeses rejeses moved this to Todo in ChatBTC Mar 18, 2024
@kouloumos
Copy link
Contributor

I believe using URL parameters for the chain of questions is not a scalable solution.

To facilitate question sharing, we could utilize our existing Supabase setup. When a user wishes to share a chat, we could generate a unique ID and store the corresponding message history. The user would then share a link containing this ID, allowing the recipient to access the chat history directly.

This brings us to a broader consideration: our policy on storing chat histories. Access to past conversations can significantly enhance user experience by enabling features like chat restoration and history review. If we're open to storing chat histories, we can not only address the sharing issue more effectively but also explore other valuable improvements.

What are your thoughts on implementing chat history storage? This decision will impact our approach to both the sharing functionality and potential future enhancements.

@Extheoisah
Copy link
Contributor Author

I believe using URL parameters for the chain of questions is not a scalable solution.

To facilitate question sharing, we could utilize our existing Supabase setup. When a user wishes to share a chat, we could generate a unique ID and store the corresponding message history. The user would then share a link containing this ID, allowing the recipient to access the chat history directly.

This brings us to a broader consideration: our policy on storing chat histories. Access to past conversations can significantly enhance user experience by enabling features like chat restoration and history review. If we're open to storing chat histories, we can not only address the sharing issue more effectively but also explore other valuable improvements.

What are your thoughts on implementing chat history storage? This decision will impact our approach to both the sharing functionality and potential future enhancements.

@Emmanuel-Develops and I theoretically explored this option. However, we don't want to store user chat histories in the db, and is one of the ethos of chat-btc. This was clearly stated by @adamjonas So we had to explore other options which was the URL params.

@kouloumos
Copy link
Contributor

Emmanuel-Develops and I theoretically explored this option. However, we don't want to store user chat histories in the db, and is one of the ethos of chat-btc. This was clearly stated by adamjonas So we had to explore other options which was the URL params.

But if we already cache the question-answer pair, aren't we indirectly store chat history?

await manageSaveToDB({
id: uuid,
query,
answer: finalAnswerWithLinks,
author,
wasAborted: typingAbortController.signal.aborted,
errorMessages,
});

If we add a process where the user chooses that they want to share the chat (same as chatGPT does), then they agree to leave some of that privacy in order to get the sharing feature that I described above. An extra addition to that could be to add some encryption into the mix, but that could only be possible if we were using some sort of user accounts that could be paired with a public-private key.

@Extheoisah
Copy link
Contributor Author

Extheoisah commented Apr 4, 2024

But if we already cache the question-answer pair, don't we indirectly store chat history?

In a sense, yes. But the cached responses are deleted after 24hrs. We do not persist them in the db. Only the default responses on the homepage are persisted.

If we add a process where the user chooses that they want to share the chat (same as chatGPT does), then they agree to leave some of that privacy in order to get the sharing feature that I described above.

This seems viable short term. This would mean we store the chat history for every query starting from the 1st query. Overall, I'll leave @adamjonas to decide on this issue

@rejeses rejeses moved this from 🆕 Todo to 🏗 In Progress in The Bitcoin Development Project Roadmap Apr 12, 2024
@rejeses rejeses moved this from 🆕 Todo to 🏗 In Progress in ChatBTC Apr 12, 2024
@Extheoisah Extheoisah moved this from 🏗 In Progress to 📋 Backlog in ChatBTC Apr 15, 2024
@Extheoisah Extheoisah moved this from 🏗 In Progress to 🆕 Todo in The Bitcoin Development Project Roadmap Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
Status: 🚀 Next Steps
Development

No branches or pull requests

2 participants