feat: SQL agent improvements (#8709)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
Michael Kret
2024-02-26 15:35:00 +02:00
committed by GitHub
parent 7012577fce
commit 09524304e6
11 changed files with 212 additions and 63 deletions

View File

@@ -2237,6 +2237,7 @@ export interface INodeGraphItem {
method?: string; // HTTP Request node v2
src_node_id?: string;
src_instance_id?: string;
agent?: string; //@n8n/n8n-nodes-langchain.agent
}
export interface INodeNameIndex {

View File

@@ -158,7 +158,9 @@ export function generateNodesGraph(
nodeItem.src_node_id = options.nodeIdMap[node.id];
}
if (node.type === 'n8n-nodes-base.httpRequest' && node.typeVersion === 1) {
if (node.type === '@n8n/n8n-nodes-langchain.agent') {
nodeItem.agent = (node.parameters.agent as string) || 'conversationalAgent';
} else if (node.type === 'n8n-nodes-base.httpRequest' && node.typeVersion === 1) {
try {
nodeItem.domain = new URL(node.parameters.url as string).hostname;
} catch {