diff --git a/bun.lock b/bun.lock index ab507098..ae7b7427 100644 --- a/bun.lock +++ b/bun.lock @@ -169,6 +169,18 @@ "typescript": "^5.0.0", }, }, + "modules/tool/packages/dailyHot": { + "name": "@fastgpt-plugins/tool-daily-hot", + "dependencies": { + "zod": "^3.24.3", + }, + "devDependencies": { + "@types/bun": "^1.2.2", + }, + "peerDependencies": { + "typescript": "^5.0.0", + }, + }, "modules/tool/packages/dalle3": { "name": "fastgpt-tools-dalle3", "dependencies": { @@ -524,6 +536,18 @@ "typescript": "^5.0.0", }, }, + "modules/tool/packages/seedream": { + "name": "@fastgpt-plugins/tool-seedream", + "dependencies": { + "zod": "^3.24.2", + }, + "devDependencies": { + "@types/bun": "latest", + }, + "peerDependencies": { + "typescript": "^5.0.0", + }, + }, "modules/tool/packages/silliconFlow": { "name": "fastgpt-tools-silliconFlow", "dependencies": { @@ -574,6 +598,18 @@ "typescript": "^5.0.0", }, }, + "modules/tool/packages/whisper": { + "name": "@fastgpt-plugins/tool-whisper", + "dependencies": { + "zod": "^3.24.3", + }, + "devDependencies": { + "@types/bun": "^1.2.2", + }, + "peerDependencies": { + "typescript": "^5.0.0", + }, + }, "modules/tool/packages/wiki": { "name": "fastgpt-tools-wiki", "dependencies": { @@ -846,6 +882,8 @@ "@fast-csv/parse": ["@fast-csv/parse@4.3.6", "", { "dependencies": { "@types/node": "^14.0.1", "lodash.escaperegexp": "^4.1.2", "lodash.groupby": "^4.6.0", "lodash.isfunction": "^3.0.9", "lodash.isnil": "^4.0.0", "lodash.isundefined": "^3.0.1", "lodash.uniq": "^4.5.0" } }, "sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA=="], + "@fastgpt-plugin/feishuBitable": ["@fastgpt-plugin/feishuBitable@workspace:modules/tool/packages/feishuBitable"], + "@fastgpt-plugin/youtube": ["@fastgpt-plugin/youtube@workspace:modules/tool/packages/youtube"], "@fastgpt-plugins/stability": ["@fastgpt-plugins/stability@workspace:modules/tool/packages/stability"], @@ -856,6 +894,8 @@ "@fastgpt-plugins/tool-chat-ppt": ["@fastgpt-plugins/tool-chat-ppt@workspace:modules/tool/packages/chatPPT"], + "@fastgpt-plugins/tool-daily-hot": ["@fastgpt-plugins/tool-daily-hot@workspace:modules/tool/packages/dailyHot"], + "@fastgpt-plugins/tool-mineru": ["@fastgpt-plugins/tool-mineru@workspace:modules/tool/packages/mineru"], "@fastgpt-plugins/tool-minmax": ["@fastgpt-plugins/tool-minmax@workspace:modules/tool/packages/minimax"], @@ -868,6 +908,10 @@ "@fastgpt-plugins/tool-search-infinity": ["@fastgpt-plugins/tool-search-infinity@workspace:modules/tool/packages/searchInfinity"], + "@fastgpt-plugins/tool-seedream": ["@fastgpt-plugins/tool-seedream@workspace:modules/tool/packages/seedream"], + + "@fastgpt-plugins/tool-whisper": ["@fastgpt-plugins/tool-whisper@workspace:modules/tool/packages/whisper"], + "@fastgpt-sdk/plugin": ["@fastgpt-sdk/plugin@workspace:sdk"], "@fortaine/fetch-event-source": ["@fortaine/fetch-event-source@3.0.6", "", {}, "sha512-621GAuLMvKtyZQ3IA6nlDWhV1V/7PGOTNIGLUifxt0KzM+dZIweJ6F3XvQF3QnqeNfS1N7WQ0Kil1Di/lhChEw=="], @@ -1134,8 +1178,6 @@ "@tediousjs/connection-string": ["@tediousjs/connection-string@0.5.0", "", {}, "sha512-7qSgZbincDDDFyRweCIEvZULFAw5iz/DeunhvuxpL31nfntX3P4Yd4HkHBRg9H8CdqY1e5WFN1PZIz/REL9MVQ=="], - "@fastgpt-plugin/feishuBitable": ["@fastgpt-plugin/feishuBitable@workspace:modules/tool/packages/feishuBitable"], - "@tool/redis": ["@tool/redis@workspace:modules/tool/packages/redis"], "@ts-rest/core": ["@ts-rest/core@3.52.1", "", { "peerDependencies": { "@types/node": "^18.18.7 || >=20.8.4", "zod": "^3.22.3" }, "optionalPeers": ["@types/node", "zod"] }, "sha512-tAjz7Kxq/grJodcTA1Anop4AVRDlD40fkksEV5Mmal88VoZeRKAG8oMHsDwdwPZz+B/zgnz0q2sF+cm5M7Bc7g=="], @@ -2474,6 +2516,8 @@ "@fast-csv/parse/@types/node": ["@types/node@14.18.63", "", {}, "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ=="], + "@fastgpt-plugin/feishuBitable/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], + "@fastgpt-plugin/youtube/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], "@fastgpt-plugins/stability/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], @@ -2484,6 +2528,8 @@ "@fastgpt-plugins/tool-chat-ppt/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], + "@fastgpt-plugins/tool-daily-hot/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], + "@fastgpt-plugins/tool-mineru/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], "@fastgpt-plugins/tool-minmax/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], @@ -2496,6 +2542,10 @@ "@fastgpt-plugins/tool-search-infinity/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], + "@fastgpt-plugins/tool-seedream/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], + + "@fastgpt-plugins/tool-whisper/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], + "@inquirer/core/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], "@inquirer/core/wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="], @@ -2612,8 +2662,6 @@ "@smithy/uuid/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "@fastgpt-plugin/feishuBitable/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], - "@tool/redis/@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], "@typescript-eslint/eslint-plugin/ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="], @@ -2874,4 +2922,4 @@ "cross-fetch/node-fetch/whatwg-url/webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="], } -} \ No newline at end of file +} diff --git a/modules/tool/packages/seedream/config.ts b/modules/tool/packages/seedream/config.ts index 0d635809..58a31dcc 100644 --- a/modules/tool/packages/seedream/config.ts +++ b/modules/tool/packages/seedream/config.ts @@ -53,7 +53,7 @@ export default defineTool({ renderTypeList: [FlowNodeInputTypeEnum.select], valueType: WorkflowIOValueTypeEnum.string, description: '生成图像的尺寸信息', - defaultValue: '1:1', + defaultValue: '2048x2048', list: [ { label: '1:1', value: '2048x2048' }, { label: '4:3', value: '2304x1728' }, @@ -74,16 +74,14 @@ export default defineTool({ description: '随机数种子, 用于控制模型生成内容的随机性', min: -1, max: 2147483647, - defaultValue: -1, - required: false + defaultValue: 0 } ], outputs: [ { valueType: WorkflowIOValueTypeEnum.string, key: 'image', - label: '生成的图片链接', - description: '生成的图片链接', + label: '图片链接', required: true } ] diff --git a/modules/tool/packages/seedream/src/index.ts b/modules/tool/packages/seedream/src/index.ts index 971398dd..e99f397f 100644 --- a/modules/tool/packages/seedream/src/index.ts +++ b/modules/tool/packages/seedream/src/index.ts @@ -6,7 +6,11 @@ export const InputType = z.object({ model: z.string().nonempty().describe('model name'), prompt: z.string().nonempty().describe('describe the desired image content'), size: z.string().optional().describe('aspect ratio of the generated content'), - seed: z.number().optional().describe('Random seed to control the randomness of model generation') + seed: z + .number() + .optional() + .default(0) + .describe('Random seed to control the randomness of model generation') }); export const OutputType = z.object({ diff --git a/modules/tool/packages/whisper/config.ts b/modules/tool/packages/whisper/config.ts index 55826607..31543a01 100644 --- a/modules/tool/packages/whisper/config.ts +++ b/modules/tool/packages/whisper/config.ts @@ -40,7 +40,11 @@ export default defineTool({ key: 'model', label: '模型', toolDescription: 'Whisper model to use for transcription', - renderTypeList: [FlowNodeInputTypeEnum.select, FlowNodeInputTypeEnum.reference], + renderTypeList: [ + FlowNodeInputTypeEnum.select, + FlowNodeInputTypeEnum.input, + FlowNodeInputTypeEnum.reference + ], valueType: WorkflowIOValueTypeEnum.string, required: true, defaultValue: 'whisper-1',