From fda49637ce592f80f2b990a1579637bea1531612 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 30 Aug 2023 12:28:01 +0100 Subject: [PATCH 1/3] add additional params --- .../nodes/documentloaders/Github/Github.ts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/packages/components/nodes/documentloaders/Github/Github.ts b/packages/components/nodes/documentloaders/Github/Github.ts index 079bffb0..b49569da 100644 --- a/packages/components/nodes/documentloaders/Github/Github.ts +++ b/packages/components/nodes/documentloaders/Github/Github.ts @@ -51,6 +51,32 @@ class Github_DocumentLoaders implements INode { type: 'boolean', optional: true }, + { + label: 'Max Concurrency', + name: 'maxConcurrency', + type: 'number', + optional: true, + additionalParams: true + }, + { + label: 'Ignore Paths', + name: 'ignorePath', + description: 'An array of paths to be ignored', + placeholder: `["*.md"]`, + type: 'string', + rows: 4, + optional: true, + additionalParams: true + }, + { + label: 'Max Retries', + name: 'maxRetries', + description: + 'The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 2.', + type: 'number', + optional: true, + additionalParams: true + }, { label: 'Text Splitter', name: 'textSplitter', @@ -73,6 +99,9 @@ class Github_DocumentLoaders implements INode { const recursive = nodeData.inputs?.recursive as boolean const textSplitter = nodeData.inputs?.textSplitter as TextSplitter const metadata = nodeData.inputs?.metadata + const maxConcurrency = nodeData.inputs?.maxConcurrency as string + const maxRetries = nodeData.inputs?.maxRetries as string + const ignorePath = nodeData.inputs?.ignorePath as string const credentialData = await getCredentialData(nodeData.credential ?? '', options) const accessToken = getCredentialParam('accessToken', credentialData, nodeData) @@ -84,6 +113,9 @@ class Github_DocumentLoaders implements INode { } if (accessToken) githubOptions.accessToken = accessToken + if (maxConcurrency) githubOptions.maxConcurrency = parseInt(maxConcurrency, 10) + if (maxRetries) githubOptions.maxRetries = parseInt(maxRetries, 10) + if (ignorePath) githubOptions.ignorePaths = JSON.parse(ignorePath) const loader = new GithubRepoLoader(repoLink, githubOptions) const docs = textSplitter ? await loader.loadAndSplit(textSplitter) : await loader.load() From b2627cafa38334e1188d9ea82fee6d35ee8114a0 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 30 Aug 2023 12:29:32 +0100 Subject: [PATCH 2/3] update steps --- packages/components/nodes/documentloaders/Github/Github.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/components/nodes/documentloaders/Github/Github.ts b/packages/components/nodes/documentloaders/Github/Github.ts index b49569da..095b3e76 100644 --- a/packages/components/nodes/documentloaders/Github/Github.ts +++ b/packages/components/nodes/documentloaders/Github/Github.ts @@ -55,6 +55,7 @@ class Github_DocumentLoaders implements INode { label: 'Max Concurrency', name: 'maxConcurrency', type: 'number', + step: 1, optional: true, additionalParams: true }, @@ -74,6 +75,7 @@ class Github_DocumentLoaders implements INode { description: 'The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 2.', type: 'number', + step: 1, optional: true, additionalParams: true }, From 6372cb9c72c784021af78c79f57b42ee39e4b29a Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 30 Aug 2023 12:34:50 +0100 Subject: [PATCH 3/3] update marketplace --- .../nodes/documentloaders/Github/Github.ts | 2 +- .../chatflows/Flowise Docs QnA.json | 31 ++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/packages/components/nodes/documentloaders/Github/Github.ts b/packages/components/nodes/documentloaders/Github/Github.ts index 095b3e76..6495e8e9 100644 --- a/packages/components/nodes/documentloaders/Github/Github.ts +++ b/packages/components/nodes/documentloaders/Github/Github.ts @@ -18,7 +18,7 @@ class Github_DocumentLoaders implements INode { constructor() { this.label = 'Github' this.name = 'github' - this.version = 1.0 + this.version = 2.0 this.type = 'Document' this.icon = 'github.png' this.category = 'Document Loaders' diff --git a/packages/server/marketplaces/chatflows/Flowise Docs QnA.json b/packages/server/marketplaces/chatflows/Flowise Docs QnA.json index 6d11f3d2..f8b274a1 100644 --- a/packages/server/marketplaces/chatflows/Flowise Docs QnA.json +++ b/packages/server/marketplaces/chatflows/Flowise Docs QnA.json @@ -265,7 +265,7 @@ "id": "github_0", "label": "Github", "name": "github", - "version": 1, + "version": 2, "type": "Document", "baseClasses": ["Document"], "category": "Document Loaders", @@ -301,6 +301,35 @@ "optional": true, "id": "github_0-input-recursive-boolean" }, + { + "label": "Max Concurrency", + "name": "maxConcurrency", + "type": "number", + "step": 1, + "optional": true, + "additionalParams": true, + "id": "github_0-input-maxConcurrency-number" + }, + { + "label": "Ignore Paths", + "name": "ignorePath", + "type": "string", + "description": "An array of paths to be ignored", + "placeholder": "[\"*.md\"]", + "rows": 4, + "optional": true, + "additionalParams": true, + "id": "github_0-input-ignorePath-string" + }, + { + "label": "Max Retries", + "name": "maxRetries", + "description": "The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 2.", + "type": "number", + "optional": true, + "additionalParams": true, + "id": "github_0-input-maxRetries-number" + }, { "label": "Metadata", "name": "metadata",