Hi, everybody. I using the information extractor node to get structured data from a text. The curious thing is that it sometimes doesn’t work and I get this error:
I googled it and apparently some people have been having this and someone suspects it’s related to Langchain. But the entries are over a year old and nobody seems to have a solution for this.
Has anybody else encountered this issue and have a suggestion for me? I am using OpenAI 4o mini for the information extractor.
Running the version 1.71.3 on Coolify with postgres
It would help if you could post the entire error message.
When I’ve seen these types of errors, it’s usually because of null or “empty” values which haven’t been accounted for in the JSON schema.
For example, consider the following schema. All looks good but perhaps address_line_2 is optional and has no value.
This would throw a parsing error because the schema dictates that address_line_2 must be a string type. One way to solve this is to either ask the AI to default to an empty string or use a enum data type that includes null