Error with Summarization Chain and Mistral AI

Describe the problem/error/question

I have used the workflow template provided here:

When used with the Mistra AI Model, the Summarization node throws the error: “Cannot read properties of undefined (reading ‘text’)”.

TypeError: Cannot read properties of undefined (reading 'text')
    at NoOpOutputParser.parseResult (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/node_modules/@langchain/core/dist/output_parsers/base.cjs:54:42)
    at NoOpOutputParser.parseResultWithPrompt (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/node_modules/@langchain/core/dist/output_parsers/base.cjs:20:21)
    at LLMChain._getFinalOutput (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/llm_chain.cjs:124:55)
    at LLMChain._call (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/llm_chain.cjs:159:46)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at LLMChain.call (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/base.cjs:120:28)
    at async Promise.all (index 1)
    at MapReduceDocumentsChain._call (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/combine_docs_chain.cjs:188:29)
    at MapReduceDocumentsChain.call (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/base.cjs:120:28)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js:207:30)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:730:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:662:53
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1064:20

Information on your n8n setup

Version: tested on 1.29.1 and 1.31.0
Database: Postgres and SQL Lite
n8n EXECUTIONS_PROCESS setting: default
Running n8n via Docker
Operating system: Debian 11

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:

Hey @denobeno,

The good news is while I was reproducing this another team member popped in this PR: fix: Mistral package update, tools issue fix by michael-radency · Pull Request #8847 · n8n-io/n8n · GitHub which fixes it so it looks like for now it will be a case of waiting for the next release.

Hi @Jon,

first of all, thanks for looking into it. That’s great to hear, I’m glad the problem could be fixed so quickly.
I’m looking forward to the release :slight_smile:

1 Like

New version [email protected] got released which includes the GitHub PR 8847.

The error is not ther anymore but it is super super long to wait for an answer…

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