"Postgres Chat Memory" save one side

How can I set the settings in the “Postgres Chat Memory” node to save text only from the client, and the response from LLM was not stored in memory?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @walker,

that’s a peculiar use-case :slight_smile:. You achieve this by using “Chat Memory Manager” and always deleting the last message which should be AI message. Something like this:

Then when we inspect the LLM logs we can see that there’s only “Human” messages:

Alternative approach, since you’re using Postgres would be to just delete the rows from the n8n_chat_histories that are not Human and match the session_key.

Hope this helps!

Oleg

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.