Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

Disable message saving to DB via an environment variable

Open ryanhalliday opened this issue 1 year ago • 4 comments

Add an environment variable DISABLE_MESSAGE_SAVING which disables messages being saved to the database. This is useful for scenarios where you are avoiding saving potential PII to your Flowise instance.

This disables the buffer memory nodes. If they were used in a Flow it will no longer work and will instead show an error on run and in the UI. Because this is a very serious environment variable to enable, so I think this is an okay result. image

Analytics integrations continue to work if enabled per flow.

Feedback will no longer work but I have not added error messages for that. I could add a validation to prevent Feedback being toggled on?

The messages UI will show a different error message: image

Future upgrades to this may shift this from an environment variable to a per-flow setting but this is the simpler approach for now.

Please let me know if you would like any changes to this or there are any other potential areas impacted!

cc @tgmerritt @HenryHengZJ

ryanhalliday avatar Jan 09 '25 01:01 ryanhalliday

oh great if this PR is doing it's work it would solve https://github.com/FlowiseAI/Flowise/issues/3832 !

dentroai avatar Jan 10 '25 14:01 dentroai

one of the downside is that you won't be able to have source documents, files, images, tools etc displayed on the chat image

thats because we save all these items on the flowise database, and only the text message is saved to the 3rd party memory node

HenryHengZJ avatar Jan 10 '25 20:01 HenryHengZJ

ok I see. For the use cases I have in my mind this should be ok!

For use cases where citations or tools have to be displayed on the chat, one would need to add custom logic to delete a message older than X. Via a cronjob for example.

dentroai avatar Jan 17 '25 14:01 dentroai

For use cases where citations or tools have to be displayed on the chat, one would need to add custom logic to delete a message older than X. Via a cronjob for example.

I would suggest creating a node that manages its memory on its own way

Other suggestions, since flowsie have queue mode, would be great if it has a task schedule view :'D

ahmedrowaihi avatar Apr 23 '25 20:04 ahmedrowaihi