From 2cadd68a431a01fc0b679144a0413aab81205fc4 Mon Sep 17 00:00:00 2001 From: automaton82 Date: Wed, 17 Apr 2024 05:30:41 -0400 Subject: [PATCH] Changing 'Output Schema' to 'Input Schema' (#2199) --- packages/server/marketplaces/tools/Make Webhook.json | 2 +- packages/server/src/index.ts | 2 +- packages/ui/src/views/tools/HowToUseFunctionDialog.jsx | 2 +- packages/ui/src/views/tools/ToolDialog.jsx | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/server/marketplaces/tools/Make Webhook.json b/packages/server/marketplaces/tools/Make Webhook.json index 93e67a3f..3f3c8b0f 100644 --- a/packages/server/marketplaces/tools/Make Webhook.json +++ b/packages/server/marketplaces/tools/Make Webhook.json @@ -5,5 +5,5 @@ "color": "linear-gradient(rgb(19,94,2), rgb(19,124,59))", "iconSrc": "https://github.com/FlowiseAI/Flowise/assets/26460777/517fdab2-8a6e-4781-b3c8-fb92cc78aa0b", "schema": "[{\"id\":0,\"property\":\"message\",\"description\":\"Message to send\",\"type\":\"string\",\"required\":true}]", - "func": "/*\n* You can use any libraries imported in Flowise\n* You can use properties specified in Output Schema as variables. Ex: Property = userid, Variable = $userid\n* Must return a string value at the end of function\n*/\n\nconst fetch = require('node-fetch');\nconst webhookUrl = 'https://hook.eu1.make.com/abcdefg';\nconst body = {\n\t\"message\": $message\n};\nconst options = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(body)\n};\ntry {\n const response = await fetch(webhookUrl, options);\n const text = await response.text();\n return text;\n} catch (error) {\n console.error(error);\n return '';\n}" + "func": "/*\n* You can use any libraries imported in Flowise\n* You can use properties specified in Input Schema as variables. Ex: Property = userid, Variable = $userid\n* Must return a string value at the end of function\n*/\n\nconst fetch = require('node-fetch');\nconst webhookUrl = 'https://hook.eu1.make.com/abcdefg';\nconst body = {\n\t\"message\": $message\n};\nconst options = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(body)\n};\ntry {\n const response = await fetch(webhookUrl, options);\n const text = await response.text();\n return text;\n} catch (error) {\n console.error(error);\n return '';\n}" } diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 8330c570..c26353f1 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -46,7 +46,7 @@ export class App { // Initialize database this.AppDataSource.initialize() .then(async () => { - logger.info('📦 [server]: Data Source is being initialized!') + logger.info('📦 [server]: Data Source is initializing...') // Run Migrations Scripts await this.AppDataSource.runMigrations({ transaction: 'each' }) diff --git a/packages/ui/src/views/tools/HowToUseFunctionDialog.jsx b/packages/ui/src/views/tools/HowToUseFunctionDialog.jsx index 47ecee89..db5df462 100644 --- a/packages/ui/src/views/tools/HowToUseFunctionDialog.jsx +++ b/packages/ui/src/views/tools/HowToUseFunctionDialog.jsx @@ -21,7 +21,7 @@ const HowToUseFunctionDialog = ({ show, onCancel }) => {