Chatbot Issues with Postgres Chat Memory and Supabase Vector Store
Problem 1: Empty Chat Memory Causing Errors
Hi guys,
I have a chatbot (Webhook Input from Voiceflow) where the Agent responds and sends answers back. The issue occurs when I add Postgres Chat Memory, which stores the entire dialogue flow and context. It seems the chat model fails when it encounters an empty part in the chat memory, resulting in a [GoogleGenerativeAI Error]: 400 Bad Request - contents.parts must not be empty
.
I found a post on the n8n community: GoogleGenerativeAI Error: 400 Bad Request. There’s a screenshot suggesting a solution, but I don’t know how to implement it. @Matheus_Oliveira
Problem 2: Chat Memory Overriding Supabase Vector Store
When the Chat Memory is attached and works, it uses the chat memory as the knowledge input instead of the Supabase Vector Store, which is not the intended behavior. My prompts are designed to use the chat memory only to track past interactions and respond specifically if the user repeats a question. However, I can’t get this to work as intended.
Information on your n8n setup
- n8n version: 1.1
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main): own
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker Self Hosted
- Operating system: Windows 11