Comments (22)
Here's the process : (Someone told me that It look that this problem happened yesterday in langchain community with the Huggingface library)
TypeError: message.toJSON is not a function
at /usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/logWrapper.js:168:73
at Array.map ()
at Proxy.connectionType (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/logWrapper.js:168:48)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Proxy._generateUncached (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/node_modules/@langchain/core/dist/language_models/llms.cjs:138:22)
at LLMChain._call (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/llm_chain.cjs:157:37)
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 createSimpleLLMChain (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/ChainLLM/ChainLlm.node.js:84:23)
at getChain (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/ChainLLM/ChainLlm.node.js:93:16)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/ChainLLM/ChainLlm.node.js:360:31)
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
from n8n.
This code was introduced by this commit:
7501ad8
As part of this PR:
#8526
I'm going to upgrade to [email protected] and see if that fixes the issue.
from n8n.
@dkindlund the good news is that sounds like a different issue so I believe the original issue here is solved and there is another one to look into.
You also don't need to worry about tagging us if we are commenting we will get notifications on new posts we are also mainly around during Berlin office hours 🙂
We will look into this new issue on Monday morning. It may be worth opening a new issue so it doesn't get confused with the original issue here.
from n8n.
Hey @the-trading-ai
If you open the LLM chain is there a larger error in there? Can you also share the workflow json so we can use it to reproduce the issue?
from n8n.
ok, it look that is a general issue. Probably from the latest version. I updated yesterday my version to the latest one
from n8n.
Same problem here in using any type o Summarization Chain (1.29.1) :
TypeError: message.toJSON is not a function
at /usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/logWrapper.js:168:73
at Array.map ()
at Proxy.connectionType (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/logWrapper.js:168:48)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Proxy._generateUncached (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/node_modules/@langchain/core/dist/language_models/llms.cjs:138:22)
at LLMChain._call (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/llm_chain.cjs:157:37)
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 StuffDocumentsChain._call (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/combine_docs_chain.cjs:62:24)
at StuffDocumentsChain.call (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/base.cjs:120:28)
at MapReduceDocumentsChain._call (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/combine_docs_chain.cjs:210:24)
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/V2/ChainSummarizationV2.node.js:337:34)
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
from n8n.
I'm also seeing the same error on [email protected]:
TypeError: message.toJSON is not a function
at /usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/logWrapper.js:168:73
at Array.map (<anonymous>)
at Proxy.connectionType (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/logWrapper.js:168:48)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Proxy._generateUncached (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/node_modules/@langchain/core/dist/language_models/llms.cjs:138:22)
at LLMChain._call (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/node_modules/langchain/dist/chains/llm_chain.cjs:157:37)
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 createSimpleLLMChain (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/ChainLLM/ChainLlm.node.js:84:23)
at getChain (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/ChainLLM/ChainLlm.node.js:93:16)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/ChainLLM/ChainLlm.node.js:360:31)
```
from n8n.
^ This issue affects all LLM function -- including OpenAI (not just HuggingFace).
from n8n.
Pretty sure this is the line that the error is referring to:
from n8n.
We will look into this in the morning and potentially put out a new released for now though you can go back to a previous release and you should be good to go.
from n8n.
Getting a different error on [email protected] - FYI:
Error: Could not get parameter
at getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1513:15)
at Object.getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:2189:24)
at getPromptInputByType (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/helpers.js:29:24)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/ChainLLM/ChainLlm.node.js:396:61)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
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
from n8n.
Ironically, the Conversational Agent
node works in [email protected] -- it's just the Basic LLM Chain
node that appears to be broken.
from n8n.
Confirmed that this issue is not present in [email protected] -- it does presently exist in all later versions.
from n8n.
Fix got released with [email protected]
from n8n.
Good news, This should now be resolved. I am going to mark this as closed and if you are still seeing this issue let me know.
from n8n.
@Joffcom , no dice. I'm still seeing these errors using the Basic LLM Chain
node in [email protected]. CC: @janober
Error: Could not get parameter
at getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1514:15)
at Object.getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:2190:24)
at getPromptInputByType (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/helpers.js:29:24)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/ChainLLM/ChainLlm.node.js:396:61)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
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:660:53
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1062:20
from n8n.
from n8n.
from n8n.
^ This workflow works fine on [email protected]
from n8n.
Hey @Joffcom and @janober , I think I sort of understand the issue.
This error appears only for legacy workflows and legacy nodes. If I create a brand new workflow with the same identical nodes, this error doesn't exist.
This tells me that there's some backwards compatibility issue that's breaking older workflows/nodes.
Steps to reproduce:
- Create a simple
Basic LLM Chain
workflow in [email protected] - Upgrade to [email protected]
- Try to run your simple workflow -- see error
As it stands right now, if there's no way to "auto-upgrade" legacy workflows/nodes to support new 1.30.1+ features, then all your existing users will be experiencing this same pain along the way. I'm not sure how to solve this issue, but FYI.
Recreating the simple Basic LLM Chain
workflow has no issues:
from n8n.
Oh, interesting... the newer Basic LLM Chain
node in [email protected] does not have the Output Parser
optional connector any more -- I don't know if that's intended or a possible secondary regression, @Joffcom . Compare the past couple of screenshots and you'll see what I mean.
from n8n.
Yup, confirmed. In [email protected]+, I had to manually regenerate the Basic LLM Chain
node to get it to work. Here's the side-by-side comparison:
from n8n.
Related Issues (20)
- OpenAI Assistant & gpt4-o HOT 9
- OpenAI Assistant creating new thread everytime HOT 8
- Accessing Ticket Object ID in Hubspot Trigger Node HOT 3
- 1.41.0 - Bug: Number of Executions Shown in Side Panel is Limited to 10 at a Time HOT 6
- ERROR: The DNS server returned an error, perhaps the server is offline HOT 2
- OpenAI Assistant - The requested model ‘gpt-4o’ cannot be used with the Assistants API in v1 HOT 1
- HTTP Request / OpenSSL Error HOT 3
- "Convert to HTML Table" Does Not Add the "Row Attributes" Option HOT 2
- workflows.map is not a function HOT 2
- Renaming the node by leaving the name field empty causes unexpected behavior HOT 5
- Can you add options for multi-branch parallel execution and for nodes to continue the workflow execution even if an error occurs? HOT 1
- Error: HTTP status 403 HOT 7
- Node Max Tries / Wait Values Limits Too Low HOT 7
- Ask AI is not present in the Code node on self-hosted Docker ver 1.41.1 HOT 3
- Pagination Does Not Reset When Re-Testing Node HOT 1
- NPM - Esm modules are not supported, dynamic (async) import fails HOT 6
- http node executes "successfully" but error is returned HOT 3
- Webhook only work in test mode... HOT 3
- IF issue. Wrong type ' NNN' is a string but was expecting a number HOT 1
- RabbitMQ Workflow had to be deactivated HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from n8n.