diff --git a/packages/server/src/marketplaces/Antonym.json b/packages/server/marketplaces/Antonym.json similarity index 100% rename from packages/server/src/marketplaces/Antonym.json rename to packages/server/marketplaces/Antonym.json diff --git a/packages/server/src/marketplaces/Conversational Agent.json b/packages/server/marketplaces/Conversational Agent.json similarity index 100% rename from packages/server/src/marketplaces/Conversational Agent.json rename to packages/server/marketplaces/Conversational Agent.json diff --git a/packages/server/src/marketplaces/Conversational Retrieval QA Chain.json b/packages/server/marketplaces/Conversational Retrieval QA Chain.json similarity index 100% rename from packages/server/src/marketplaces/Conversational Retrieval QA Chain.json rename to packages/server/marketplaces/Conversational Retrieval QA Chain.json diff --git a/packages/server/src/marketplaces/Github Repo QnA.json b/packages/server/marketplaces/Github Repo QnA.json similarity index 100% rename from packages/server/src/marketplaces/Github Repo QnA.json rename to packages/server/marketplaces/Github Repo QnA.json diff --git a/packages/server/src/marketplaces/MRLKAgent.json b/packages/server/marketplaces/MRLKAgent.json similarity index 100% rename from packages/server/src/marketplaces/MRLKAgent.json rename to packages/server/marketplaces/MRLKAgent.json diff --git a/packages/server/src/marketplaces/Simple LLM Chain.json b/packages/server/marketplaces/Simple LLM Chain.json similarity index 100% rename from packages/server/src/marketplaces/Simple LLM Chain.json rename to packages/server/marketplaces/Simple LLM Chain.json diff --git a/packages/server/src/marketplaces/Translator.json b/packages/server/marketplaces/Translator.json similarity index 100% rename from packages/server/src/marketplaces/Translator.json rename to packages/server/marketplaces/Translator.json diff --git a/packages/server/package.json b/packages/server/package.json index 5eee51115..582371a9d 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "flowise", - "version": "1.0.0", + "version": "1.0.1", "description": "Flowiseai Server", "main": "dist/index", "types": "dist/index.d.ts", @@ -9,6 +9,7 @@ }, "files": [ "bin", + "marketplaces", "dist", "npm-shrinkwrap.json", "oclif.manifest.json", diff --git a/packages/server/src/example.ts b/packages/server/src/example.ts deleted file mode 100644 index a2624ff7b..000000000 --- a/packages/server/src/example.ts +++ /dev/null @@ -1,146 +0,0 @@ -export const workflow1 = { - nodes: [ - { - width: 200, - height: 66, - id: 'promptTemplate_0', - position: { - x: 295.0571878493141, - y: 108.66221078850214 - }, - type: 'customNode', - data: { - label: 'Prompt Template', - name: 'promptTemplate', - type: 'PromptTemplate', - inputAnchors: [], - outputAnchors: [ - { - id: 'promptTemplate_0-output-0' - } - ], - selected: false, - inputs: { - template: 'What is a good name for a company that makes {product}?', - inputVariables: '["product"]' - } - }, - selected: false, - positionAbsolute: { - x: 295.0571878493141, - y: 108.66221078850214 - }, - dragging: false - }, - { - width: 200, - height: 66, - id: 'openAI_0', - position: { - x: 774, - y: 97.75 - }, - type: 'customNode', - data: { - label: 'OpenAI', - name: 'openAI', - type: 'OpenAI', - inputAnchors: [], - outputAnchors: [ - { - id: 'openAI_0-output-0' - } - ], - selected: false, - inputs: { - modelName: 'text-davinci-003', - temperature: '0.7', - openAIApiKey: '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' - }, - calls: { - prompt: 'Hi, how are you?' - } - }, - selected: false, - positionAbsolute: { - x: 774, - y: 97.75 - }, - dragging: false - }, - { - width: 200, - height: 66, - id: 'llmChain_0', - position: { - x: 1034.233162523021, - y: 97.59868104260748 - }, - type: 'customNode', - data: { - label: 'LLM Chain', - name: 'llmChain', - type: 'LLMChain', - inputAnchors: [ - { - id: 'llmChain_0-input-0' - } - ], - outputAnchors: [ - { - id: 'llmChain_0-output-0' - } - ], - selected: false, - inputs: { - llm: '{{openAI_0.data.instance}}', - prompt: '{{promptTemplate_0.data.instance}}' - }, - calls: { - variable: '{"product":"colorful socks"}' - } - }, - selected: false, - positionAbsolute: { - x: 1034.233162523021, - y: 97.59868104260748 - }, - dragging: false - } - ], - edges: [ - { - source: 'nodeJS_0', - sourceHandle: 'nodeJS_0-output-0', - target: 'nodeJS_1', - targetHandle: 'nodeJS_1-input-0', - type: 'buttonedge', - id: 'nodeJS_0-nodeJS_0-output-0-nodeJS_1-nodeJS_1-input-0', - data: { - label: '' - } - }, - { - source: 'webhook_0', - sourceHandle: 'webhook_0-output-0', - target: 'wait_0', - targetHandle: 'wait_0-input-0', - type: 'buttonedge', - id: 'webhook_0-webhook_0-output-0-wait_0-wait_0-input-0', - data: { - label: '' - } - }, - { - source: 'wait_0', - sourceHandle: 'wait_0-output-0', - target: 'nodeJS_0', - targetHandle: 'nodeJS_0-input-0', - type: 'buttonedge', - id: 'wait_0-wait_0-output-0-nodeJS_0-nodeJS_0-input-0', - data: { - label: '' - } - } - ] -} diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index a17eda106..777d5fd17 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -243,11 +243,11 @@ export class App { // Get all chatflows for marketplaces this.app.get('/api/v1/marketplaces', async (req: Request, res: Response) => { - const marketplaceDir = path.join(__dirname, '..', 'src/marketplaces') + const marketplaceDir = path.join(__dirname, '..', 'marketplaces') const jsonsInDir = fs.readdirSync(marketplaceDir).filter((file) => path.extname(file) === '.json') const templates: any[] = [] jsonsInDir.forEach((file, index) => { - const filePath = path.join(__dirname, '..', 'src/marketplaces', file) + const filePath = path.join(__dirname, '..', 'marketplaces', file) const fileData = fs.readFileSync(filePath) const fileDataObj = JSON.parse(fileData.toString()) const template = {