##Hi guys, I’ve been encountering an issue for a couple of days. To give some context, I’m self-hosted, and I use Ngrok for my Webhook integration.
This is my workflow:
After several attempts, I can confirm that the issue lies with the session ID key in the memory tool. I’ve tried it with both Windows and PostgreSQL. I’m using this variable as the session ID key, is a phone number.:
{{ $(‘Webhook’).item.json.body.from }}
The first interaction works fine, but after that, I get an error:
Issues: * Bad request - please check your parameters (Invalid value for ‘content’: expected a string, got null.)
However, if I use this for the session ID key then, no error occurs.:
{{ $(‘Webhook’).item.json.body.from + ’ ’ + new Date().toISOString() }}
The problem with this approach is that it doesn’t remember anything, and the AI agent can’t perform its tasks properly.
I can confirm that it is happening on my end as well. In my case, it involves the Slack User ID, and it always fails on the second attempt.
I noticed that as long as the key exists in Redis (in my case), it will always fail.
If I replace the session ID with “client_msg_id,” which always changes, it will work; however, in that case, the chat memory won’t remember the previous messages per user.
I have the same problem as well.
For me it’s with a Simple Memory Node and a web-hook of a Google Chat App.
Either if I use an existing session ID, one that always changes ;
The chat memory won’t remember anything.
Hi, Well its kind of normal I guess I don’t expect to take a lada to a race-track and become first. Similar for simple memory. its just to test and play around.
I can get that but it seems that all Memory options that are available result in the same error.
I’ve tested Simple Memory, Zep Memory, @kruvi used a Redis Memory…
Even tho it’s a recent issue, technology, I would expect a fix from the dev team or at least a work around.
I’m not sure yet what causes this issue, sometimes it happens and sometimes it does not.
But it seems that the agent saves the first user message with null content, when it retrieves it the error happens. At least here in my DB the data that the agent saves is missing a lot of properties inside the json, it saves this: {
“type”: “human”
}
So it has no “content” property then the agent will get null and that breaks the memory and the workflow.
In general the AI agents have been acting weird lately, this problem happens mostly with chatgpt, I’m also struggling with input schema for tools.
Edit: I simply can not explain but I’ve tested before and did not work and now it does, the solution was “.toJsonString()” after adding it to my messages array, it’s working, at least for now.
Hi @arthurlongue i have this same problem, but in my case, I was using a Basic LLM Chain node before an AI Agent node and the latter expects it to contain a “content” property inside the object. And my Basic LLM Chain was sending a “text”. Here’s what I did:
Enable Require Specific Output Format for my Basic LLM Chain node
I have the same problem. The first time it runs, it works perfectly, but the second time it reads the memory and finds information, the prompt fails, stating that (Invalid value for ‘content’: expected a string, got null.)
I haven’t been able to get it to work. If anyone already has a solution, please share it.