Failed to parse text

I am using the AI-text classifier node and I use Llama3.2. I use Ollama to run the model locally. There is a problem in parsing the answer from the AI-Model. The text classifier node hast to decide if the Chatmessage input belongs to the category correct, incorrect or not existing. Sometimes the parsing works, but most of the time not. I also tried to adjust the systemprompt, but that did not work reliable.

Failed to parse. Text: “{\n “correct”: false,\n " incorrect”: false,\n “not existing”: true\n}“. Error: [\n {\n “code”: “invalid_type”,\n “expected”: “boolean”,\n “received”: “undefined”,\n “path”: [\n " correct”\n ],\n “message”: “Required”\n }\n]\n\nTroubleshooting URL: https://js.langchain.com/docs/troubleshooting/errors/OUTPUT_PARSING_FAILURE/\n

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

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 n8n Team,

I faced the same issue with AI-text classifier
here my config details :
n8n version:1.68.0
Database (default: SQLite): PostgrSQL
n8n EXECUTIONS_PROCESS setting (default: own, main):Deprecated
Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
Operating system:Ubuntu 22.04

Failed to parse. Text: "```json { "type": "object", "properties": { "Sales": { "type": "boolean", "description": "Should be true if the input has category \"Sales\"" }, "Human Resources (RH)": { "type": "boolean", "description": "Should be true if the input has category \"Human Resources (RH}\"" }, "Business Development": { "type": "boolean", "description": "Should be true if the input has category \"Business Development\"" }, "Procurement": { "type": "boolean", "description": "Should be true if the input has category \"Procurement\"" }, "Other": { "type": "boolean", "description": "Should be true if the input has category \"Other\"" } }, "required": ["Sales", "Human Resources (RH)", "Business Development", "Procurement", "Other"], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } ```". Error: [ { "code": "invalid_type", "expected": "boolean", "received": "undefined", "path": [ "Sales" ], "message": "Required" }, { "code": "invalid_type", "expected": "boolean", "received": "undefined", "path": [ "Human Resources (RH)" ], "message": "Required" }, { "code": "invalid_type", "expected": "boolean", "received": "undefined", "path": [ "Business Development" ], "message": "Required" }, { "code": "invalid_type", "expected": "boolean", "received": "undefined", "path": [ "Procurement" ], "message": "Required" }, { "code": "invalid_type", "expected": "boolean", "received": "undefined", "path": [ "Other" ], "message": "Required" } ] Troubleshooting URL: https://js.langchain.com/docs/troubleshooting/errors/OUTPUT_PARSING_FAILURE/

Regards

I’m also receiving this error. Have tried a couple different Models in Ollama was well as simplifing the Text Classifier down about as much as possible.