Hi everybody, I’m trying to check one example about langchain, but I have a problem when I run the free example:
I update Custom - LLM Chain Node: const { PromptTemplate } = require(‘langchain/prompts’); to const { PromptTemplate } = require(‘@langchain/core/prompts’);
And
I update Custom - Wikipedia: const { WikipediaQueryRun } = require(‘langchain/tools’); to const { WikipediaQueryRun } = require(‘@langchain/community/dist/tools’);
But in this last code, there is a error:
Error in sub-node ‘Custom - Wikipedia’
Package path ‘./dist/tools’ is not exported null Open node
Error details
Other info
Item Index
0
Node type
@n8n/n8n-nodes-langchain.code
Node version
1 (Latest)
n8n version
1.60.1 (Self Hosted)
Time
30/9/2024, 8:51:33 p. m.
Stack trace
NodeOperationError: Error in sub-node Custom - Wikipedia at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/NodeExecuteFunctions.ts:2897:11 at async Promise.all (index 0) at Object.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/NodeExecuteFunctions.ts:2906:16) at Object.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/NodeExecuteFunctions.ts:3684:12) at getConnectedTools (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/utils/helpers.ts:183:5) at Object.conversationalAgentExecute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ConversationalAgent/execute.ts:33:16) at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/Agent.node.ts:392:11) at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1382:8) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1080:27 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1800:11
Agent1
Test step
Parameters
Settings
Tip: Get a feel for agents with our quick tutorial or see an example of how this node works
Agent
Text
Fixed
Expression
{{ $json.input }}
What year was Einstein born?
Options
No properties
Chat Model *
Memory
Tool
Output Parser
I wish this node would…
Waiting for you to submit the chat
Information on your n8n setup
- n8n version: 1.60.1
- Running n8n via (Docker, desktop app):
- Operating system: windows