upstash / rag-chat

Batteries included SDK for RAG development.
https://upstash.com/docs/vector/sdks/rag-chat/gettingstarted
MIT License
143 stars 30 forks source link

option to disableHistory #44

Closed enesakar closed 1 week ago

enesakar commented 1 month ago

sometimes I do not want the conversation (both message and response) to be recorded to history. I need an option to enable that.

const resp = await ragChat.chat("Does the following sentence look like a question semantically? Say just yes or no " + question, {disableRAG: true, disableHistory: true});
eraykeskinmac commented 1 month ago

Hi @enesakar,

Hope you're doing well! I've been tinkering with the disableHistory feature you mentioned, and I think I've made some good progress. I've got the basic functionality working in ChatOptions and RAGChat, and even added some tests.

Thing is, I've hit a bit of a snag with the pre-commit tests - they're failing because of some missing environment variables. I could really use your advice on this:

  1. Is there a way around these test failures for now?
  2. Any tips on setting up the right environment for testing?
  3. Would it be okay to open a PR and explain the situation there?

I'm pretty excited about contributing to this project, so any guidance you can offer would be awesome. Thanks for your time, and let me know if there's anything else I can do to help!

ogzhanolguncu commented 1 month ago

You can add your feature along with a simple test to cover it. You can probably use the QStash token from our console. I'll double-check to make sure everything is good. We use a variety of keys to test everything thoroughly, so it can be a bit challenging for others to contribute, but we'll fix that soon. For now, I'll disable the pre-commit tests.

ogzhanolguncu commented 1 month ago

@eraykeskinmac If you're eager to contribute, feel free to find RAG repositories that don't use our SDK and convert them to our RAG Chat. If you find any missing functionality, contact me here or on Discord, and we can go over it together. That would be fantastic! One example would be Nutlope/pdftochat.

ogzhanolguncu commented 1 month ago

Pre-commit hook is disabled.

eraykeskinmac commented 1 month ago

@ogzhanolguncu Thanks for disabling the pre-commit hook! I'll test and commit the disableHistory feature, then check out the Nutlope/pdftochat example for potential SDK integration. I'll reach out if I have any questions. Excited to contribute!

yunusemreozdemir commented 1 week ago

Closing this issue as this option is implemented in PR #57 and released in v1.3.1