@n8n/n8n-nodes-langchain 2.46.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/known/credentials.json +1 -27
- package/dist/known/nodes.json +0 -84
- package/dist/node-definitions/.nodes-hash +1 -1
- package/dist/node-definitions/index.ts +0 -4
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v1.schema.js +5 -7
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v1.ts +13 -65
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v11.schema.js +5 -7
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v11.ts +13 -65
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v12.schema.js +5 -7
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v12.ts +13 -65
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v13.schema.js +4 -7
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v13.ts +13 -70
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v14.schema.js +4 -7
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v14.ts +13 -70
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v15.schema.js +4 -7
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v15.ts +13 -70
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v16.schema.js +4 -7
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v16.ts +13 -70
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v17.schema.js +4 -7
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v17.ts +13 -70
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v18.schema.js +4 -7
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v18.ts +13 -70
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v19.schema.js +4 -7
- package/dist/node-definitions/nodes/n8n-nodes-langchain/agent/v19.ts +13 -70
- package/dist/nodes/Guardrails/helpers/configureNodeInputs.js +0 -2
- package/dist/nodes/Guardrails/helpers/configureNodeInputs.js.map +1 -1
- package/dist/nodes/agents/Agent/Agent.node.js +10 -11
- package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
- package/dist/nodes/agents/Agent/V2/AgentToolV2.node.js +1 -1
- package/dist/nodes/agents/Agent/V2/AgentToolV2.node.js.map +1 -1
- package/dist/nodes/agents/Agent/V2/AgentV2.node.js +3 -2
- package/dist/nodes/agents/Agent/V2/AgentV2.node.js.map +1 -1
- package/dist/nodes/agents/Agent/V2/utils.js +0 -2
- package/dist/nodes/agents/Agent/V2/utils.js.map +1 -1
- package/dist/nodes/agents/Agent/V3/AgentToolV3.node.js +1 -1
- package/dist/nodes/agents/Agent/V3/AgentToolV3.node.js.map +1 -1
- package/dist/nodes/agents/Agent/V3/AgentV3.node.js +1 -1
- package/dist/nodes/agents/Agent/V3/AgentV3.node.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/utils.d.ts +1 -6
- package/dist/nodes/agents/Agent/agents/utils.js +0 -20
- package/dist/nodes/agents/Agent/agents/utils.js.map +1 -1
- package/dist/nodes/agents/Agent/utils.d.ts +2 -1
- package/dist/nodes/agents/Agent/utils.js +23 -2
- package/dist/nodes/agents/Agent/utils.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js +1 -1
- package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js +1 -1
- package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js.map +1 -1
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +0 -1
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
- package/dist/nodes/vendors/Microsoft/langchain-utils.js +1 -1
- package/dist/nodes/vendors/Microsoft/langchain-utils.js.map +1 -1
- package/dist/nodes/{agents/Agent/agents/ConversationalAgent → vendors/Microsoft}/prompt.d.ts +0 -1
- package/dist/nodes/{agents/Agent/agents/ConversationalAgent → vendors/Microsoft}/prompt.js +1 -14
- package/dist/nodes/vendors/Microsoft/prompt.js.map +1 -0
- package/dist/typecheck.tsbuildinfo +1 -1
- package/dist/types/credentials.json +1 -4
- package/dist/types/nodes.json +11 -33
- package/dist/utils/helpers.js +0 -2
- package/dist/utils/helpers.js.map +1 -1
- package/package.json +13 -45
- package/dist/credentials/MotorheadApi.credentials.d.ts +0 -9
- package/dist/credentials/MotorheadApi.credentials.js +0 -49
- package/dist/credentials/MotorheadApi.credentials.js.map +0 -1
- package/dist/credentials/SerpApi.credentials.d.ts +0 -9
- package/dist/credentials/SerpApi.credentials.js +0 -42
- package/dist/credentials/SerpApi.credentials.js.map +0 -1
- package/dist/credentials/ZepApi.credentials.d.ts +0 -9
- package/dist/credentials/ZepApi.credentials.js +0 -61
- package/dist/credentials/ZepApi.credentials.js.map +0 -1
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/index.ts +0 -20
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v1/index.schema.js +0 -26
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v1/index.ts +0 -21
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v1/mode_insert.schema.js +0 -29
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v1/mode_insert.ts +0 -60
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v1/mode_load.schema.js +0 -35
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v1/mode_load.ts +0 -93
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v1/mode_retrieve.schema.js +0 -32
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v1/mode_retrieve.ts +0 -84
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v1/mode_retrieve_as_tool.schema.js +0 -36
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v1/mode_retrieve_as_tool.ts +0 -107
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v11/index.schema.js +0 -26
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v11/index.ts +0 -21
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v11/mode_insert.schema.js +0 -30
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v11/mode_insert.ts +0 -65
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v11/mode_load.schema.js +0 -35
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v11/mode_load.ts +0 -93
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v11/mode_retrieve.schema.js +0 -32
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v11/mode_retrieve.ts +0 -84
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v11/mode_retrieve_as_tool.schema.js +0 -36
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v11/mode_retrieve_as_tool.ts +0 -107
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v12/index.schema.js +0 -26
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v12/index.ts +0 -21
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v12/mode_insert.schema.js +0 -30
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v12/mode_insert.ts +0 -65
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v12/mode_load.schema.js +0 -35
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v12/mode_load.ts +0 -93
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v12/mode_retrieve.schema.js +0 -32
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v12/mode_retrieve.ts +0 -84
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v12/mode_retrieve_as_tool.schema.js +0 -36
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v12/mode_retrieve_as_tool.ts +0 -107
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v13/index.schema.js +0 -26
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v13/index.ts +0 -21
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v13/mode_insert.schema.js +0 -30
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v13/mode_insert.ts +0 -65
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v13/mode_load.schema.js +0 -35
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v13/mode_load.ts +0 -93
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v13/mode_retrieve.schema.js +0 -32
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v13/mode_retrieve.ts +0 -84
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v13/mode_retrieve_as_tool.schema.js +0 -35
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v13/mode_retrieve_as_tool.ts +0 -103
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v14/index.schema.js +0 -26
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v14/index.ts +0 -21
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v14/mode_insert.schema.js +0 -30
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v14/mode_insert.ts +0 -65
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v14/mode_load.schema.js +0 -35
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v14/mode_load.ts +0 -93
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v14/mode_retrieve.schema.js +0 -32
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v14/mode_retrieve.ts +0 -84
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v14/mode_retrieve_as_tool.schema.js +0 -35
- package/dist/node-definitions/nodes/n8n-nodes-langchain/vectorStoreZep/v14/mode_retrieve_as_tool.ts +0 -103
- package/dist/nodes/agents/Agent/V1/AgentV1.node.d.ts +0 -6
- package/dist/nodes/agents/Agent/V1/AgentV1.node.js +0 -422
- package/dist/nodes/agents/Agent/V1/AgentV1.node.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +0 -220
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +0 -96
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +0 -210
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +0 -8
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.d.ts +0 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js +0 -5
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js +0 -196
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +0 -79
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.d.ts +0 -1
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js +0 -11
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js +0 -240
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +0 -102
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.d.ts +0 -4
- package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js +0 -11
- package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +0 -329
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.d.ts +0 -3
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +0 -169
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.d.ts +0 -3
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js +0 -20
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.d.ts +0 -3
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js +0 -21
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.d.ts +0 -3
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js +0 -72
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js +0 -23
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/description.js +0 -20
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/description.js.map +0 -1
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.js +0 -98
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.js.map +0 -1
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.d.ts +0 -5
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +0 -388
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +0 -1
- package/dist/nodes/agents/OpenAiAssistant/utils.d.ts +0 -5
- package/dist/nodes/agents/OpenAiAssistant/utils.js +0 -35
- package/dist/nodes/agents/OpenAiAssistant/utils.js.map +0 -1
- package/dist/nodes/code/Code.node.d.ts +0 -10
- package/dist/nodes/code/Code.node.js +0 -381
- package/dist/nodes/code/Code.node.js.map +0 -1
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.d.ts +0 -7
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js +0 -174
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map +0 -1
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/binary.svg +0 -1
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.d.ts +0 -5
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +0 -170
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +0 -1
- package/dist/nodes/document_loaders/DocumentGithubLoader/github.svg +0 -1
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.d.ts +0 -5
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js +0 -84
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +0 -1
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/json.svg +0 -1
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.d.ts +0 -15
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +0 -247
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +0 -1
- package/dist/nodes/llms/LMOpenAi/openAiLight.dark.svg +0 -3
- package/dist/nodes/llms/LMOpenAi/openAiLight.svg +0 -3
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.d.ts +0 -5
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js +0 -93
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js.map +0 -1
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.d.ts +0 -5
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +0 -119
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +0 -1
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.d.ts +0 -5
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +0 -151
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +0 -1
- package/dist/nodes/memory/MemoryZep/zep.png +0 -0
- package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.d.ts +0 -5
- package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js +0 -344
- package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js.map +0 -1
- package/dist/nodes/tools/ToolHttpRequest/descriptions.d.ts +0 -7
- package/dist/nodes/tools/ToolHttpRequest/descriptions.js +0 -389
- package/dist/nodes/tools/ToolHttpRequest/descriptions.js.map +0 -1
- package/dist/nodes/tools/ToolHttpRequest/httprequest.dark.svg +0 -3
- package/dist/nodes/tools/ToolHttpRequest/httprequest.svg +0 -1
- package/dist/nodes/tools/ToolHttpRequest/interfaces.d.ts +0 -20
- package/dist/nodes/tools/ToolHttpRequest/interfaces.js +0 -3
- package/dist/nodes/tools/ToolHttpRequest/interfaces.js.map +0 -1
- package/dist/nodes/tools/ToolHttpRequest/utils.d.ts +0 -25
- package/dist/nodes/tools/ToolHttpRequest/utils.js +0 -671
- package/dist/nodes/tools/ToolHttpRequest/utils.js.map +0 -1
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.d.ts +0 -6
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +0 -143
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +0 -1
- package/dist/nodes/tools/ToolSerpApi/serpApi.svg +0 -1
- package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.d.ts +0 -5
- package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js +0 -67
- package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.d.ts +0 -5
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +0 -86
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.d.ts +0 -5
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +0 -65
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.d.ts +0 -11
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js +0 -113
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStorePineconeInsert/pinecone.svg +0 -1
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.d.ts +0 -11
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js +0 -100
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStorePineconeLoad/pinecone.svg +0 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.d.ts +0 -11
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js +0 -103
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/supabase.svg +0 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.d.ts +0 -11
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js +0 -96
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/supabase.svg +0 -1
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.d.ts +0 -29
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +0 -130
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStoreZep/zep.png +0 -0
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.d.ts +0 -5
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js +0 -122
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStoreZepInsert/zep.png +0 -0
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.d.ts +0 -5
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +0 -103
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStoreZepLoad/zep.png +0 -0
|
@@ -5,11 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export interface LcAgentV12Params {
|
|
8
|
-
|
|
9
|
-
* Agent
|
|
10
|
-
* @default conversationalAgent
|
|
11
|
-
*/
|
|
12
|
-
agent?: 'conversationalAgent' | 'openAiFunctionsAgent' | 'planAndExecuteAgent' | 'reActAgent' | 'sqlAgent';
|
|
8
|
+
promptType?: 'auto' | 'guardrails' | 'define' | Expression<string>;
|
|
13
9
|
/**
|
|
14
10
|
* Prompt (User Message)
|
|
15
11
|
* @builderHint Use expressions to include dynamic data from previous nodes (e.g., expr('{{ $json.input }}')). Static text prompts ignore incoming data.
|
|
@@ -18,9 +14,9 @@ export interface LcAgentV12Params {
|
|
|
18
14
|
* @required when the displayOptions conditions above match
|
|
19
15
|
*/
|
|
20
16
|
text?: string | Expression<string>;
|
|
17
|
+
hasOutputParser?: boolean;
|
|
21
18
|
/**
|
|
22
19
|
* Options
|
|
23
|
-
* @displayOptions.show { agent: ["toolsAgent"] }
|
|
24
20
|
* @default {}
|
|
25
21
|
*/
|
|
26
22
|
options?: {
|
|
@@ -83,63 +79,20 @@ export interface LcAgentV12Params {
|
|
|
83
79
|
objectValue?: IDataObject | string | Expression<string>;
|
|
84
80
|
}>;
|
|
85
81
|
};
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
humanMessage?: string | Expression<string>;
|
|
89
|
-
/** String to use directly as the human message template
|
|
90
|
-
*/
|
|
91
|
-
humanMessageTemplate?: string | Expression<string>;
|
|
92
|
-
/** String to put before the list of tools
|
|
93
|
-
* @default Answer the following questions as best you can. You have access to the following tools:
|
|
94
|
-
*/
|
|
95
|
-
prefix?: string | Expression<string>;
|
|
96
|
-
/** String to put after the list of tools that will be used if chat model is used
|
|
97
|
-
* @default Begin! Reminder to always use the exact characters `Final Answer` when responding.
|
|
98
|
-
*/
|
|
99
|
-
suffixChat?: string | Expression<string>;
|
|
100
|
-
/** String to put after the list of tools that will be used if regular model is used
|
|
101
|
-
*/
|
|
102
|
-
suffix?: string | Expression<string>;
|
|
103
|
-
/** Comma-separated list of tables to ignore from the database. If empty, no tables are ignored.
|
|
104
|
-
*/
|
|
105
|
-
ignoredTables?: string | Expression<string>;
|
|
106
|
-
/** Number of sample rows to include in the prompt to the agent. It helps the agent to understand the schema of the database but it also increases the amount of tokens used.
|
|
107
|
-
* @default 3
|
|
108
|
-
*/
|
|
109
|
-
includedSampleRows?: number | Expression<number>;
|
|
110
|
-
/** Comma-separated list of tables to include in the database. If empty, all tables are included.
|
|
111
|
-
*/
|
|
112
|
-
includedTables?: string | Expression<string>;
|
|
113
|
-
/** Prefix prompt to use for the agent
|
|
82
|
+
/** Batch processing options for rate limiting
|
|
83
|
+
* @default {}
|
|
114
84
|
*/
|
|
115
|
-
|
|
116
|
-
/**
|
|
85
|
+
batching?: {
|
|
86
|
+
/** How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering.
|
|
87
|
+
* @default 1
|
|
117
88
|
*/
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* @default
|
|
89
|
+
batchSize?: number | Expression<number>;
|
|
90
|
+
/** Delay in milliseconds between batches. This is useful for rate limiting.
|
|
91
|
+
* @default 0
|
|
121
92
|
*/
|
|
122
|
-
|
|
93
|
+
delayBetweenBatches?: number | Expression<number>;
|
|
94
|
+
};
|
|
123
95
|
};
|
|
124
|
-
/**
|
|
125
|
-
* SQL database to connect to
|
|
126
|
-
* @displayOptions.show { agent: ["sqlAgent"] }
|
|
127
|
-
* @default sqlite
|
|
128
|
-
*/
|
|
129
|
-
dataSource?: 'mysql' | 'postgres' | 'sqlite' | Expression<string>;
|
|
130
|
-
/**
|
|
131
|
-
* Input Binary Field
|
|
132
|
-
* @hint The name of the input binary field containing the file to be extracted
|
|
133
|
-
* @displayOptions.show { agent: ["sqlAgent"], dataSource: ["sqlite"] }
|
|
134
|
-
* @default data
|
|
135
|
-
*/
|
|
136
|
-
binaryPropertyName?: string | Expression<string>;
|
|
137
|
-
/**
|
|
138
|
-
* Prompt
|
|
139
|
-
* @displayOptions.show { agent: ["sqlAgent"] }
|
|
140
|
-
* @required when the displayOptions conditions above match
|
|
141
|
-
*/
|
|
142
|
-
input?: string | Expression<string>;
|
|
143
96
|
}
|
|
144
97
|
|
|
145
98
|
export interface LcAgentV12SubnodeConfig {
|
|
@@ -152,11 +105,6 @@ export interface LcAgentV12SubnodeConfig {
|
|
|
152
105
|
outputParser?: OutputParserInstance;
|
|
153
106
|
}
|
|
154
107
|
|
|
155
|
-
export interface LcAgentV12Credentials {
|
|
156
|
-
mySql: CredentialReference;
|
|
157
|
-
postgres: CredentialReference;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
108
|
interface LcAgentV12NodeBase {
|
|
161
109
|
type: '@n8n/n8n-nodes-langchain.agent';
|
|
162
110
|
version: 1.2;
|
|
@@ -164,7 +112,7 @@ interface LcAgentV12NodeBase {
|
|
|
164
112
|
}
|
|
165
113
|
|
|
166
114
|
export type LcAgentV12ParamsNode = LcAgentV12NodeBase & {
|
|
167
|
-
config: NodeConfig<LcAgentV12Params> & {
|
|
115
|
+
config: NodeConfig<LcAgentV12Params> & { subnodes: LcAgentV12SubnodeConfig };
|
|
168
116
|
};
|
|
169
117
|
|
|
170
118
|
export type LcAgentV12Node = LcAgentV12ParamsNode;
|
|
@@ -24,13 +24,10 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
24
24
|
|
|
25
25
|
// Parameters schema
|
|
26
26
|
const parametersSchema = z.object({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
options: resolveOneOfSchemas({ parameters, variants: [{ schema: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), passthroughBinaryImages: booleanOrExpression.optional(), passthroughBinaryPdfs: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["toolsAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ humanMessage: stringOrExpression.optional(), systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["conversationalAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["openAiFunctionsAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ humanMessageTemplate: stringOrExpression.optional(), prefix: stringOrExpression.optional(), suffixChat: stringOrExpression.optional(), suffix: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["reActAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ ignoredTables: stringOrExpression.optional(), includedSampleRows: numberOrExpression.optional(), includedTables: stringOrExpression.optional(), prefixPrompt: stringOrExpression.optional(), suffixPrompt: stringOrExpression.optional(), topK: numberOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["sqlAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ humanMessageTemplate: stringOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["planAndExecuteAgent"]}}, defaults: {"agent":"conversationalAgent"} }] }),
|
|
32
|
-
dataSource: resolveSchema({ parameters, schema: z.union([z.literal('mysql'), z.literal('postgres'), z.literal('sqlite'), expressionSchema]), required: false, displayOptions: {"show":{"agent":["sqlAgent"]}}, defaults: {"agent":"conversationalAgent"} }),
|
|
33
|
-
binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"agent":["sqlAgent"],"dataSource":["sqlite"]}}, defaults: {"agent":"conversationalAgent","dataSource":"sqlite"} }),
|
|
27
|
+
promptType: z.union([z.literal('auto'), z.literal('guardrails'), z.literal('define'), expressionSchema]).optional(),
|
|
28
|
+
text: resolveSchema({ parameters, schema: stringOrExpression, required: true, displayOptions: {"show":{"promptType":["define"]}}, defaults: {"promptType":"auto"} }),
|
|
29
|
+
hasOutputParser: z.boolean().optional(),
|
|
30
|
+
options: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), passthroughBinaryImages: booleanOrExpression.optional(), passthroughBinaryPdfs: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional(), batching: z.object({ batchSize: numberOrExpression.optional(), delayBetweenBatches: numberOrExpression.optional() }).optional() }).optional(),
|
|
34
31
|
});
|
|
35
32
|
|
|
36
33
|
// Return combined config schema
|
|
@@ -5,16 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export interface LcAgentV13Params {
|
|
8
|
-
|
|
9
|
-
* Agent
|
|
10
|
-
* @default conversationalAgent
|
|
11
|
-
*/
|
|
12
|
-
agent?: 'conversationalAgent' | 'openAiFunctionsAgent' | 'planAndExecuteAgent' | 'reActAgent' | 'sqlAgent';
|
|
13
|
-
/**
|
|
14
|
-
* Source for Prompt (User Message)
|
|
15
|
-
* @default auto
|
|
16
|
-
*/
|
|
17
|
-
promptType?: 'auto' | 'guardrails' | 'define' | Expression<string>;
|
|
8
|
+
promptType?: 'auto' | 'guardrails' | 'define' | Expression<string>;
|
|
18
9
|
/**
|
|
19
10
|
* Prompt (User Message)
|
|
20
11
|
* @builderHint Use expressions to include dynamic data from previous nodes (e.g., expr('{{ $json.input }}')). Static text prompts ignore incoming data.
|
|
@@ -23,15 +14,9 @@ export interface LcAgentV13Params {
|
|
|
23
14
|
* @required when the displayOptions conditions above match
|
|
24
15
|
*/
|
|
25
16
|
text?: string | Expression<string>;
|
|
26
|
-
|
|
27
|
-
* Require Specific Output Format
|
|
28
|
-
* @displayOptions.hide { agent: ["sqlAgent"] }
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
hasOutputParser?: boolean;
|
|
17
|
+
hasOutputParser?: boolean;
|
|
32
18
|
/**
|
|
33
19
|
* Options
|
|
34
|
-
* @displayOptions.show { agent: ["toolsAgent"] }
|
|
35
20
|
* @default {}
|
|
36
21
|
*/
|
|
37
22
|
options?: {
|
|
@@ -94,57 +79,20 @@ export interface LcAgentV13Params {
|
|
|
94
79
|
objectValue?: IDataObject | string | Expression<string>;
|
|
95
80
|
}>;
|
|
96
81
|
};
|
|
97
|
-
/**
|
|
98
|
-
|
|
99
|
-
humanMessage?: string | Expression<string>;
|
|
100
|
-
/** String to use directly as the human message template
|
|
101
|
-
*/
|
|
102
|
-
humanMessageTemplate?: string | Expression<string>;
|
|
103
|
-
/** String to put before the list of tools
|
|
104
|
-
* @default Answer the following questions as best you can. You have access to the following tools:
|
|
105
|
-
*/
|
|
106
|
-
prefix?: string | Expression<string>;
|
|
107
|
-
/** String to put after the list of tools that will be used if chat model is used
|
|
108
|
-
* @default Begin! Reminder to always use the exact characters `Final Answer` when responding.
|
|
109
|
-
*/
|
|
110
|
-
suffixChat?: string | Expression<string>;
|
|
111
|
-
/** String to put after the list of tools that will be used if regular model is used
|
|
112
|
-
*/
|
|
113
|
-
suffix?: string | Expression<string>;
|
|
114
|
-
/** Comma-separated list of tables to ignore from the database. If empty, no tables are ignored.
|
|
115
|
-
*/
|
|
116
|
-
ignoredTables?: string | Expression<string>;
|
|
117
|
-
/** Number of sample rows to include in the prompt to the agent. It helps the agent to understand the schema of the database but it also increases the amount of tokens used.
|
|
118
|
-
* @default 3
|
|
119
|
-
*/
|
|
120
|
-
includedSampleRows?: number | Expression<number>;
|
|
121
|
-
/** Comma-separated list of tables to include in the database. If empty, all tables are included.
|
|
122
|
-
*/
|
|
123
|
-
includedTables?: string | Expression<string>;
|
|
124
|
-
/** Prefix prompt to use for the agent
|
|
82
|
+
/** Batch processing options for rate limiting
|
|
83
|
+
* @default {}
|
|
125
84
|
*/
|
|
126
|
-
|
|
127
|
-
/**
|
|
85
|
+
batching?: {
|
|
86
|
+
/** How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering.
|
|
87
|
+
* @default 1
|
|
128
88
|
*/
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @default
|
|
89
|
+
batchSize?: number | Expression<number>;
|
|
90
|
+
/** Delay in milliseconds between batches. This is useful for rate limiting.
|
|
91
|
+
* @default 0
|
|
132
92
|
*/
|
|
133
|
-
|
|
93
|
+
delayBetweenBatches?: number | Expression<number>;
|
|
94
|
+
};
|
|
134
95
|
};
|
|
135
|
-
/**
|
|
136
|
-
* SQL database to connect to
|
|
137
|
-
* @displayOptions.show { agent: ["sqlAgent"] }
|
|
138
|
-
* @default sqlite
|
|
139
|
-
*/
|
|
140
|
-
dataSource?: 'mysql' | 'postgres' | 'sqlite' | Expression<string>;
|
|
141
|
-
/**
|
|
142
|
-
* Input Binary Field
|
|
143
|
-
* @hint The name of the input binary field containing the file to be extracted
|
|
144
|
-
* @displayOptions.show { agent: ["sqlAgent"], dataSource: ["sqlite"] }
|
|
145
|
-
* @default data
|
|
146
|
-
*/
|
|
147
|
-
binaryPropertyName?: string | Expression<string>;
|
|
148
96
|
}
|
|
149
97
|
|
|
150
98
|
export interface LcAgentV13SubnodeConfig {
|
|
@@ -157,11 +105,6 @@ export interface LcAgentV13SubnodeConfig {
|
|
|
157
105
|
outputParser?: OutputParserInstance;
|
|
158
106
|
}
|
|
159
107
|
|
|
160
|
-
export interface LcAgentV13Credentials {
|
|
161
|
-
mySql: CredentialReference;
|
|
162
|
-
postgres: CredentialReference;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
108
|
interface LcAgentV13NodeBase {
|
|
166
109
|
type: '@n8n/n8n-nodes-langchain.agent';
|
|
167
110
|
version: 1.3;
|
|
@@ -169,7 +112,7 @@ interface LcAgentV13NodeBase {
|
|
|
169
112
|
}
|
|
170
113
|
|
|
171
114
|
export type LcAgentV13ParamsNode = LcAgentV13NodeBase & {
|
|
172
|
-
config: NodeConfig<LcAgentV13Params> & {
|
|
115
|
+
config: NodeConfig<LcAgentV13Params> & { subnodes: LcAgentV13SubnodeConfig };
|
|
173
116
|
};
|
|
174
117
|
|
|
175
118
|
export type LcAgentV13Node = LcAgentV13ParamsNode;
|
|
@@ -24,13 +24,10 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
24
24
|
|
|
25
25
|
// Parameters schema
|
|
26
26
|
const parametersSchema = z.object({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
options: resolveOneOfSchemas({ parameters, variants: [{ schema: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), passthroughBinaryImages: booleanOrExpression.optional(), passthroughBinaryPdfs: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["toolsAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ humanMessage: stringOrExpression.optional(), systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["conversationalAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["openAiFunctionsAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ humanMessageTemplate: stringOrExpression.optional(), prefix: stringOrExpression.optional(), suffixChat: stringOrExpression.optional(), suffix: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["reActAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ ignoredTables: stringOrExpression.optional(), includedSampleRows: numberOrExpression.optional(), includedTables: stringOrExpression.optional(), prefixPrompt: stringOrExpression.optional(), suffixPrompt: stringOrExpression.optional(), topK: numberOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["sqlAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ humanMessageTemplate: stringOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["planAndExecuteAgent"]}}, defaults: {"agent":"conversationalAgent"} }] }),
|
|
32
|
-
dataSource: resolveSchema({ parameters, schema: z.union([z.literal('mysql'), z.literal('postgres'), z.literal('sqlite'), expressionSchema]), required: false, displayOptions: {"show":{"agent":["sqlAgent"]}}, defaults: {"agent":"conversationalAgent"} }),
|
|
33
|
-
binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"agent":["sqlAgent"],"dataSource":["sqlite"]}}, defaults: {"agent":"conversationalAgent","dataSource":"postgres"} }),
|
|
27
|
+
promptType: z.union([z.literal('auto'), z.literal('guardrails'), z.literal('define'), expressionSchema]).optional(),
|
|
28
|
+
text: resolveSchema({ parameters, schema: stringOrExpression, required: true, displayOptions: {"show":{"promptType":["define"]}}, defaults: {"promptType":"auto"} }),
|
|
29
|
+
hasOutputParser: z.boolean().optional(),
|
|
30
|
+
options: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), passthroughBinaryImages: booleanOrExpression.optional(), passthroughBinaryPdfs: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional(), batching: z.object({ batchSize: numberOrExpression.optional(), delayBetweenBatches: numberOrExpression.optional() }).optional() }).optional(),
|
|
34
31
|
});
|
|
35
32
|
|
|
36
33
|
// Return combined config schema
|
|
@@ -5,16 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export interface LcAgentV14Params {
|
|
8
|
-
|
|
9
|
-
* Agent
|
|
10
|
-
* @default conversationalAgent
|
|
11
|
-
*/
|
|
12
|
-
agent?: 'conversationalAgent' | 'openAiFunctionsAgent' | 'planAndExecuteAgent' | 'reActAgent' | 'sqlAgent';
|
|
13
|
-
/**
|
|
14
|
-
* Source for Prompt (User Message)
|
|
15
|
-
* @default auto
|
|
16
|
-
*/
|
|
17
|
-
promptType?: 'auto' | 'guardrails' | 'define' | Expression<string>;
|
|
8
|
+
promptType?: 'auto' | 'guardrails' | 'define' | Expression<string>;
|
|
18
9
|
/**
|
|
19
10
|
* Prompt (User Message)
|
|
20
11
|
* @builderHint Use expressions to include dynamic data from previous nodes (e.g., expr('{{ $json.input }}')). Static text prompts ignore incoming data.
|
|
@@ -23,15 +14,9 @@ export interface LcAgentV14Params {
|
|
|
23
14
|
* @required when the displayOptions conditions above match
|
|
24
15
|
*/
|
|
25
16
|
text?: string | Expression<string>;
|
|
26
|
-
|
|
27
|
-
* Require Specific Output Format
|
|
28
|
-
* @displayOptions.hide { agent: ["sqlAgent"] }
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
hasOutputParser?: boolean;
|
|
17
|
+
hasOutputParser?: boolean;
|
|
32
18
|
/**
|
|
33
19
|
* Options
|
|
34
|
-
* @displayOptions.show { agent: ["toolsAgent"] }
|
|
35
20
|
* @default {}
|
|
36
21
|
*/
|
|
37
22
|
options?: {
|
|
@@ -94,57 +79,20 @@ export interface LcAgentV14Params {
|
|
|
94
79
|
objectValue?: IDataObject | string | Expression<string>;
|
|
95
80
|
}>;
|
|
96
81
|
};
|
|
97
|
-
/**
|
|
98
|
-
|
|
99
|
-
humanMessage?: string | Expression<string>;
|
|
100
|
-
/** String to use directly as the human message template
|
|
101
|
-
*/
|
|
102
|
-
humanMessageTemplate?: string | Expression<string>;
|
|
103
|
-
/** String to put before the list of tools
|
|
104
|
-
* @default Answer the following questions as best you can. You have access to the following tools:
|
|
105
|
-
*/
|
|
106
|
-
prefix?: string | Expression<string>;
|
|
107
|
-
/** String to put after the list of tools that will be used if chat model is used
|
|
108
|
-
* @default Begin! Reminder to always use the exact characters `Final Answer` when responding.
|
|
109
|
-
*/
|
|
110
|
-
suffixChat?: string | Expression<string>;
|
|
111
|
-
/** String to put after the list of tools that will be used if regular model is used
|
|
112
|
-
*/
|
|
113
|
-
suffix?: string | Expression<string>;
|
|
114
|
-
/** Comma-separated list of tables to ignore from the database. If empty, no tables are ignored.
|
|
115
|
-
*/
|
|
116
|
-
ignoredTables?: string | Expression<string>;
|
|
117
|
-
/** Number of sample rows to include in the prompt to the agent. It helps the agent to understand the schema of the database but it also increases the amount of tokens used.
|
|
118
|
-
* @default 3
|
|
119
|
-
*/
|
|
120
|
-
includedSampleRows?: number | Expression<number>;
|
|
121
|
-
/** Comma-separated list of tables to include in the database. If empty, all tables are included.
|
|
122
|
-
*/
|
|
123
|
-
includedTables?: string | Expression<string>;
|
|
124
|
-
/** Prefix prompt to use for the agent
|
|
82
|
+
/** Batch processing options for rate limiting
|
|
83
|
+
* @default {}
|
|
125
84
|
*/
|
|
126
|
-
|
|
127
|
-
/**
|
|
85
|
+
batching?: {
|
|
86
|
+
/** How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering.
|
|
87
|
+
* @default 1
|
|
128
88
|
*/
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @default
|
|
89
|
+
batchSize?: number | Expression<number>;
|
|
90
|
+
/** Delay in milliseconds between batches. This is useful for rate limiting.
|
|
91
|
+
* @default 0
|
|
132
92
|
*/
|
|
133
|
-
|
|
93
|
+
delayBetweenBatches?: number | Expression<number>;
|
|
94
|
+
};
|
|
134
95
|
};
|
|
135
|
-
/**
|
|
136
|
-
* SQL database to connect to
|
|
137
|
-
* @displayOptions.show { agent: ["sqlAgent"] }
|
|
138
|
-
* @default postgres
|
|
139
|
-
*/
|
|
140
|
-
dataSource?: 'mysql' | 'postgres' | 'sqlite' | Expression<string>;
|
|
141
|
-
/**
|
|
142
|
-
* Input Binary Field
|
|
143
|
-
* @hint The name of the input binary field containing the file to be extracted
|
|
144
|
-
* @displayOptions.show { agent: ["sqlAgent"], dataSource: ["sqlite"] }
|
|
145
|
-
* @default data
|
|
146
|
-
*/
|
|
147
|
-
binaryPropertyName?: string | Expression<string>;
|
|
148
96
|
}
|
|
149
97
|
|
|
150
98
|
export interface LcAgentV14SubnodeConfig {
|
|
@@ -157,11 +105,6 @@ export interface LcAgentV14SubnodeConfig {
|
|
|
157
105
|
outputParser?: OutputParserInstance;
|
|
158
106
|
}
|
|
159
107
|
|
|
160
|
-
export interface LcAgentV14Credentials {
|
|
161
|
-
mySql: CredentialReference;
|
|
162
|
-
postgres: CredentialReference;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
108
|
interface LcAgentV14NodeBase {
|
|
166
109
|
type: '@n8n/n8n-nodes-langchain.agent';
|
|
167
110
|
version: 1.4;
|
|
@@ -169,7 +112,7 @@ interface LcAgentV14NodeBase {
|
|
|
169
112
|
}
|
|
170
113
|
|
|
171
114
|
export type LcAgentV14ParamsNode = LcAgentV14NodeBase & {
|
|
172
|
-
config: NodeConfig<LcAgentV14Params> & {
|
|
115
|
+
config: NodeConfig<LcAgentV14Params> & { subnodes: LcAgentV14SubnodeConfig };
|
|
173
116
|
};
|
|
174
117
|
|
|
175
118
|
export type LcAgentV14Node = LcAgentV14ParamsNode;
|
|
@@ -24,13 +24,10 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
24
24
|
|
|
25
25
|
// Parameters schema
|
|
26
26
|
const parametersSchema = z.object({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
options: resolveOneOfSchemas({ parameters, variants: [{ schema: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), passthroughBinaryImages: booleanOrExpression.optional(), passthroughBinaryPdfs: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["toolsAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ humanMessage: stringOrExpression.optional(), systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["conversationalAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["openAiFunctionsAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ humanMessageTemplate: stringOrExpression.optional(), prefix: stringOrExpression.optional(), suffixChat: stringOrExpression.optional(), suffix: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["reActAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ ignoredTables: stringOrExpression.optional(), includedSampleRows: numberOrExpression.optional(), includedTables: stringOrExpression.optional(), prefixPrompt: stringOrExpression.optional(), suffixPrompt: stringOrExpression.optional(), topK: numberOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["sqlAgent"]}}, defaults: {"agent":"conversationalAgent"} }, { schema: z.object({ humanMessageTemplate: stringOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["planAndExecuteAgent"]}}, defaults: {"agent":"conversationalAgent"} }] }),
|
|
32
|
-
dataSource: resolveSchema({ parameters, schema: z.union([z.literal('mysql'), z.literal('postgres'), z.literal('sqlite'), expressionSchema]), required: false, displayOptions: {"show":{"agent":["sqlAgent"]}}, defaults: {"agent":"conversationalAgent"} }),
|
|
33
|
-
binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"agent":["sqlAgent"],"dataSource":["sqlite"]}}, defaults: {"agent":"conversationalAgent","dataSource":"postgres"} }),
|
|
27
|
+
promptType: z.union([z.literal('auto'), z.literal('guardrails'), z.literal('define'), expressionSchema]).optional(),
|
|
28
|
+
text: resolveSchema({ parameters, schema: stringOrExpression, required: true, displayOptions: {"show":{"promptType":["define"]}}, defaults: {"promptType":"auto"} }),
|
|
29
|
+
hasOutputParser: z.boolean().optional(),
|
|
30
|
+
options: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), passthroughBinaryImages: booleanOrExpression.optional(), passthroughBinaryPdfs: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional(), batching: z.object({ batchSize: numberOrExpression.optional(), delayBetweenBatches: numberOrExpression.optional() }).optional() }).optional(),
|
|
34
31
|
});
|
|
35
32
|
|
|
36
33
|
// Return combined config schema
|
|
@@ -5,16 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export interface LcAgentV15Params {
|
|
8
|
-
|
|
9
|
-
* Agent
|
|
10
|
-
* @default conversationalAgent
|
|
11
|
-
*/
|
|
12
|
-
agent?: 'conversationalAgent' | 'openAiFunctionsAgent' | 'planAndExecuteAgent' | 'reActAgent' | 'sqlAgent';
|
|
13
|
-
/**
|
|
14
|
-
* Source for Prompt (User Message)
|
|
15
|
-
* @default auto
|
|
16
|
-
*/
|
|
17
|
-
promptType?: 'auto' | 'guardrails' | 'define' | Expression<string>;
|
|
8
|
+
promptType?: 'auto' | 'guardrails' | 'define' | Expression<string>;
|
|
18
9
|
/**
|
|
19
10
|
* Prompt (User Message)
|
|
20
11
|
* @builderHint Use expressions to include dynamic data from previous nodes (e.g., expr('{{ $json.input }}')). Static text prompts ignore incoming data.
|
|
@@ -23,15 +14,9 @@ export interface LcAgentV15Params {
|
|
|
23
14
|
* @required when the displayOptions conditions above match
|
|
24
15
|
*/
|
|
25
16
|
text?: string | Expression<string>;
|
|
26
|
-
|
|
27
|
-
* Require Specific Output Format
|
|
28
|
-
* @displayOptions.hide { agent: ["sqlAgent"] }
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
hasOutputParser?: boolean;
|
|
17
|
+
hasOutputParser?: boolean;
|
|
32
18
|
/**
|
|
33
19
|
* Options
|
|
34
|
-
* @displayOptions.show { agent: ["toolsAgent"] }
|
|
35
20
|
* @default {}
|
|
36
21
|
*/
|
|
37
22
|
options?: {
|
|
@@ -94,57 +79,20 @@ export interface LcAgentV15Params {
|
|
|
94
79
|
objectValue?: IDataObject | string | Expression<string>;
|
|
95
80
|
}>;
|
|
96
81
|
};
|
|
97
|
-
/**
|
|
98
|
-
|
|
99
|
-
humanMessage?: string | Expression<string>;
|
|
100
|
-
/** String to use directly as the human message template
|
|
101
|
-
*/
|
|
102
|
-
humanMessageTemplate?: string | Expression<string>;
|
|
103
|
-
/** String to put before the list of tools
|
|
104
|
-
* @default Answer the following questions as best you can. You have access to the following tools:
|
|
105
|
-
*/
|
|
106
|
-
prefix?: string | Expression<string>;
|
|
107
|
-
/** String to put after the list of tools that will be used if chat model is used
|
|
108
|
-
* @default Begin! Reminder to always use the exact characters `Final Answer` when responding.
|
|
109
|
-
*/
|
|
110
|
-
suffixChat?: string | Expression<string>;
|
|
111
|
-
/** String to put after the list of tools that will be used if regular model is used
|
|
112
|
-
*/
|
|
113
|
-
suffix?: string | Expression<string>;
|
|
114
|
-
/** Comma-separated list of tables to ignore from the database. If empty, no tables are ignored.
|
|
115
|
-
*/
|
|
116
|
-
ignoredTables?: string | Expression<string>;
|
|
117
|
-
/** Number of sample rows to include in the prompt to the agent. It helps the agent to understand the schema of the database but it also increases the amount of tokens used.
|
|
118
|
-
* @default 3
|
|
119
|
-
*/
|
|
120
|
-
includedSampleRows?: number | Expression<number>;
|
|
121
|
-
/** Comma-separated list of tables to include in the database. If empty, all tables are included.
|
|
122
|
-
*/
|
|
123
|
-
includedTables?: string | Expression<string>;
|
|
124
|
-
/** Prefix prompt to use for the agent
|
|
82
|
+
/** Batch processing options for rate limiting
|
|
83
|
+
* @default {}
|
|
125
84
|
*/
|
|
126
|
-
|
|
127
|
-
/**
|
|
85
|
+
batching?: {
|
|
86
|
+
/** How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering.
|
|
87
|
+
* @default 1
|
|
128
88
|
*/
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @default
|
|
89
|
+
batchSize?: number | Expression<number>;
|
|
90
|
+
/** Delay in milliseconds between batches. This is useful for rate limiting.
|
|
91
|
+
* @default 0
|
|
132
92
|
*/
|
|
133
|
-
|
|
93
|
+
delayBetweenBatches?: number | Expression<number>;
|
|
94
|
+
};
|
|
134
95
|
};
|
|
135
|
-
/**
|
|
136
|
-
* SQL database to connect to
|
|
137
|
-
* @displayOptions.show { agent: ["sqlAgent"] }
|
|
138
|
-
* @default postgres
|
|
139
|
-
*/
|
|
140
|
-
dataSource?: 'mysql' | 'postgres' | 'sqlite' | Expression<string>;
|
|
141
|
-
/**
|
|
142
|
-
* Input Binary Field
|
|
143
|
-
* @hint The name of the input binary field containing the file to be extracted
|
|
144
|
-
* @displayOptions.show { agent: ["sqlAgent"], dataSource: ["sqlite"] }
|
|
145
|
-
* @default data
|
|
146
|
-
*/
|
|
147
|
-
binaryPropertyName?: string | Expression<string>;
|
|
148
96
|
}
|
|
149
97
|
|
|
150
98
|
export interface LcAgentV15SubnodeConfig {
|
|
@@ -157,11 +105,6 @@ export interface LcAgentV15SubnodeConfig {
|
|
|
157
105
|
outputParser?: OutputParserInstance;
|
|
158
106
|
}
|
|
159
107
|
|
|
160
|
-
export interface LcAgentV15Credentials {
|
|
161
|
-
mySql: CredentialReference;
|
|
162
|
-
postgres: CredentialReference;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
108
|
interface LcAgentV15NodeBase {
|
|
166
109
|
type: '@n8n/n8n-nodes-langchain.agent';
|
|
167
110
|
version: 1.5;
|
|
@@ -169,7 +112,7 @@ interface LcAgentV15NodeBase {
|
|
|
169
112
|
}
|
|
170
113
|
|
|
171
114
|
export type LcAgentV15ParamsNode = LcAgentV15NodeBase & {
|
|
172
|
-
config: NodeConfig<LcAgentV15Params> & {
|
|
115
|
+
config: NodeConfig<LcAgentV15Params> & { subnodes: LcAgentV15SubnodeConfig };
|
|
173
116
|
};
|
|
174
117
|
|
|
175
118
|
export type LcAgentV15Node = LcAgentV15ParamsNode;
|
|
@@ -24,13 +24,10 @@ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrE
|
|
|
24
24
|
|
|
25
25
|
// Parameters schema
|
|
26
26
|
const parametersSchema = z.object({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
options: resolveOneOfSchemas({ parameters, variants: [{ schema: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), passthroughBinaryImages: booleanOrExpression.optional(), passthroughBinaryPdfs: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["toolsAgent"]}}, defaults: {"agent":"toolsAgent"} }, { schema: z.object({ humanMessage: stringOrExpression.optional(), systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["conversationalAgent"]}}, defaults: {"agent":"toolsAgent"} }, { schema: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["openAiFunctionsAgent"]}}, defaults: {"agent":"toolsAgent"} }, { schema: z.object({ humanMessageTemplate: stringOrExpression.optional(), prefix: stringOrExpression.optional(), suffixChat: stringOrExpression.optional(), suffix: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["reActAgent"]}}, defaults: {"agent":"toolsAgent"} }, { schema: z.object({ ignoredTables: stringOrExpression.optional(), includedSampleRows: numberOrExpression.optional(), includedTables: stringOrExpression.optional(), prefixPrompt: stringOrExpression.optional(), suffixPrompt: stringOrExpression.optional(), topK: numberOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["sqlAgent"]}}, defaults: {"agent":"toolsAgent"} }, { schema: z.object({ humanMessageTemplate: stringOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional() }), required: false, displayOptions: {"show":{"agent":["planAndExecuteAgent"]}}, defaults: {"agent":"toolsAgent"} }] }),
|
|
32
|
-
dataSource: resolveSchema({ parameters, schema: z.union([z.literal('mysql'), z.literal('postgres'), z.literal('sqlite'), expressionSchema]), required: false, displayOptions: {"show":{"agent":["sqlAgent"]}}, defaults: {"agent":"toolsAgent"} }),
|
|
33
|
-
binaryPropertyName: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"agent":["sqlAgent"],"dataSource":["sqlite"]}}, defaults: {"agent":"toolsAgent","dataSource":"postgres"} }),
|
|
27
|
+
promptType: z.union([z.literal('auto'), z.literal('guardrails'), z.literal('define'), expressionSchema]).optional(),
|
|
28
|
+
text: resolveSchema({ parameters, schema: stringOrExpression, required: true, displayOptions: {"show":{"promptType":["define"]}}, defaults: {"promptType":"auto"} }),
|
|
29
|
+
hasOutputParser: z.boolean().optional(),
|
|
30
|
+
options: z.object({ systemMessage: stringOrExpression.optional(), maxIterations: numberOrExpression.optional(), returnIntermediateSteps: booleanOrExpression.optional(), passthroughBinaryImages: booleanOrExpression.optional(), passthroughBinaryPdfs: booleanOrExpression.optional(), tracingMetadata: z.object({ values: z.array(z.object({ key: stringOrExpression.optional(), type: z.union([z.literal('arrayValue'), z.literal('booleanValue'), z.literal('numberValue'), z.literal('objectValue'), z.literal('stringValue'), expressionSchema]).optional(), stringValue: stringOrExpression.optional(), numberValue: stringOrExpression.optional(), booleanValue: z.union([z.literal('true'), z.literal('false'), expressionSchema]).optional(), arrayValue: stringOrExpression.optional(), objectValue: z.union([iDataObjectSchema, z.string()]).optional() })).optional() }).optional(), batching: z.object({ batchSize: numberOrExpression.optional(), delayBetweenBatches: numberOrExpression.optional() }).optional() }).optional(),
|
|
34
31
|
});
|
|
35
32
|
|
|
36
33
|
// Return combined config schema
|