From 749120a9adc3beccb2f9555b35077e326ec7f824 Mon Sep 17 00:00:00 2001 From: Priyadharshan Date: Wed, 2 Sep 2026 12:29:03 +0530 Subject: [PATCH 1/6] feat(dify): add new actions for listing conversations, knowledge bases, querying knowledge base, running workflows, and sending chat messages --- .../list-conversations/list-conversations.mjs | 66 ++++++++++++++ .../list-knowledge-bases.mjs | 49 +++++++++++ .../query-knowledge-base.mjs | 85 +++++++++++++++++++ .../actions/run-workflow/run-workflow.mjs | 44 ++++++++++ .../send-chat-message/send-chat-message.mjs | 63 ++++++++++++++ components/dify/dify.app.mjs | 72 +++++++++++++++- components/dify/package.json | 7 +- pnpm-lock.yaml | 6 +- 8 files changed, 385 insertions(+), 7 deletions(-) create mode 100644 components/dify/actions/list-conversations/list-conversations.mjs create mode 100644 components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs create mode 100644 components/dify/actions/query-knowledge-base/query-knowledge-base.mjs create mode 100644 components/dify/actions/run-workflow/run-workflow.mjs create mode 100644 components/dify/actions/send-chat-message/send-chat-message.mjs diff --git a/components/dify/actions/list-conversations/list-conversations.mjs b/components/dify/actions/list-conversations/list-conversations.mjs new file mode 100644 index 0000000000000..b5d1da039fdd6 --- /dev/null +++ b/components/dify/actions/list-conversations/list-conversations.mjs @@ -0,0 +1,66 @@ +// x-pd-ai: optimized +import dify from "../../dify.app.mjs"; + +export default { + key: "dify-list-conversations", + name: "List Conversations", + description: "List a Dify Chatflow, Chatbot, Agent, or Legacy Agent app's conversations, most recently active first. Conversations are scoped by `User`, so pass the same value used in **Send Chat Message** to see that end user's threads. [See the documentation](https://docs.dify.ai/en/api-reference/conversations/list-conversations)", + version: "0.0.1", + type: "action", + annotations: { + readOnlyHint: true, + destructiveHint: false, + openWorldHint: true, + }, + props: { + dify, + user: { + propDefinition: [ + dify, + "user", + ], + description: "A unique identifier for the end user whose conversations to list. This must match the `User` value passed to **Send Chat Message** for those conversations to be visible.", + optional: true, + }, + lastId: { + type: "string", + label: "Last Conversation ID", + description: "Pagination cursor: the `id` of the last conversation from the previous page's results. Omit to fetch the first page.", + optional: true, + }, + limit: { + type: "integer", + label: "Limit", + description: "Number of conversations to return, between `1` and `100`. Defaults to `20`.", + min: 1, + max: 100, + optional: true, + }, + sortBy: { + type: "string", + label: "Sort By", + description: "Field to sort results by. Defaults to `-updated_at` (most recently updated first).", + options: [ + "created_at", + "-created_at", + "updated_at", + "-updated_at", + ], + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dify.listConversations({ + $, + params: { + user: this.user, + last_id: this.lastId, + limit: this.limit, + sort_by: this.sortBy, + }, + }); + + $.export("$summary", `Found ${response.data.length} conversation(s)`); + return response; + }, +}; diff --git a/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs b/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs new file mode 100644 index 0000000000000..30a3969c50c7a --- /dev/null +++ b/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs @@ -0,0 +1,49 @@ +// x-pd-ai: optimized +import dify from "../../dify.app.mjs"; + +export default { + key: "dify-list-knowledge-bases", + name: "List Knowledge Bases", + description: "List the knowledge bases (datasets) visible to your Dify account, optionally filtered by name. Use this to find the `Knowledge Base ID` needed by **Query Knowledge Base**. Requires a knowledge base API key, which is distinct from the app API key used by **Send Chat Message** and **Run Workflow**. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/list-knowledge-bases)", + version: "0.0.1", + type: "action", + annotations: { + readOnlyHint: true, + destructiveHint: false, + openWorldHint: true, + }, + props: { + dify, + keyword: { + type: "string", + label: "Keyword", + description: "Filter knowledge bases by name, e.g. `Product Documentation`.", + optional: true, + }, + page: { + type: "integer", + label: "Page", + description: "Page number of results to return. Defaults to `1`.", + optional: true, + }, + limit: { + type: "integer", + label: "Limit", + description: "Number of knowledge bases to return per page. Defaults to `20`.", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dify.listDatasets({ + $, + params: { + keyword: this.keyword, + page: this.page, + limit: this.limit, + }, + }); + + $.export("$summary", `Found ${response.data.length} knowledge base(s)`); + return response; + }, +}; diff --git a/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs b/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs new file mode 100644 index 0000000000000..f621b94c80726 --- /dev/null +++ b/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs @@ -0,0 +1,85 @@ +// x-pd-ai: optimized +import { ConfigurationError } from "@pipedream/platform"; +import dify from "../../dify.app.mjs"; + +const SEARCH_METHODS = [ + "keyword_search", + "semantic_search", + "full_text_search", + "hybrid_search", +]; + +export default { + key: "dify-query-knowledge-base", + name: "Query Knowledge Base", + description: "Search a Dify knowledge base (dataset) and return the chunks most relevant to a query. Requires a knowledge base API key, which is distinct from the app API key used by **Send Chat Message** and **Run Workflow**. Use **List Knowledge Bases** to find the `Knowledge Base ID`. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval)", + version: "0.0.1", + type: "action", + annotations: { + readOnlyHint: true, + destructiveHint: false, + openWorldHint: true, + }, + props: { + dify, + datasetId: { + type: "string", + label: "Knowledge Base ID", + description: "The ID of the knowledge base to search. Use **List Knowledge Bases** to find valid IDs.", + }, + query: { + type: "string", + label: "Query", + description: "The search text, up to 250 characters, e.g. `What is Dify?`", + }, + searchMethod: { + type: "string", + label: "Search Method", + description: "The retrieval method to use. Setting this, `Top K`, or `Score Threshold` builds a full retrieval configuration for this request (with reranking disabled) instead of using the knowledge base's own configured defaults. Leave all three unset to use the knowledge base's defaults.", + options: SEARCH_METHODS, + optional: true, + }, + topK: { + type: "integer", + label: "Top K", + description: "The maximum number of matching chunks to return. Defaults to `3` if any of `Search Method`, `Top K`, or `Score Threshold` is set.", + optional: true, + }, + scoreThreshold: { + type: "string", + label: "Score Threshold", + description: "The minimum similarity score (between `0` and `1`) a chunk must have to be included in the results, e.g. `0.5`. Setting this enables score threshold filtering for this request.", + optional: true, + }, + }, + async run({ $ }) { + if (this.query.length > 250) { + throw new ConfigurationError("Query must be 250 characters or fewer."); + } + + const useCustomRetrieval = this.searchMethod + || this.topK !== undefined + || this.scoreThreshold !== undefined; + const retrievalModel = useCustomRetrieval && { + search_method: this.searchMethod || "hybrid_search", + reranking_enable: false, + top_k: this.topK ?? 3, + score_threshold_enabled: this.scoreThreshold !== undefined, + score_threshold: this.scoreThreshold !== undefined + ? Number(this.scoreThreshold) + : undefined, + }; + + const response = await this.dify.retrieveFromDataset({ + $, + datasetId: this.datasetId, + data: { + query: this.query, + retrieval_model: retrievalModel || undefined, + }, + }); + + $.export("$summary", `Found ${response.records.length} matching chunk(s) for "${this.query}"`); + return response; + }, +}; diff --git a/components/dify/actions/run-workflow/run-workflow.mjs b/components/dify/actions/run-workflow/run-workflow.mjs new file mode 100644 index 0000000000000..42465b9bffde5 --- /dev/null +++ b/components/dify/actions/run-workflow/run-workflow.mjs @@ -0,0 +1,44 @@ +// x-pd-ai: optimized +import dify from "../../dify.app.mjs"; + +export default { + key: "dify-run-workflow", + name: "Run Workflow", + description: "Run a Dify Workflow app's published workflow and return its outputs. Requires the workflow to be published — draft-only workflows return a `bad_request` error. This action uses `blocking` response mode, which waits for the run to finish before returning; long-running workflows on Dify Cloud risk being cut off by the platform's 100-second edge proxy timeout, in which case the run may still complete server-side but this action will not see the result. [See the documentation](https://docs.dify.ai/en/api-reference/workflow-runs/run-workflow)", + version: "0.0.1", + type: "action", + annotations: { + readOnlyHint: false, + destructiveHint: false, + openWorldHint: true, + }, + props: { + dify, + inputs: { + propDefinition: [ + dify, + "inputs", + ], + }, + user: { + propDefinition: [ + dify, + "user", + ], + }, + }, + async run({ $ }) { + const response = await this.dify.runWorkflow({ + $, + data: { + inputs: this.inputs ?? {}, + user: this.user, + response_mode: "blocking", + }, + }); + + const { data } = response; + $.export("$summary", `Workflow run ${data.id} finished with status "${data.status}"`); + return response; + }, +}; diff --git a/components/dify/actions/send-chat-message/send-chat-message.mjs b/components/dify/actions/send-chat-message/send-chat-message.mjs new file mode 100644 index 0000000000000..d21226eb91e4b --- /dev/null +++ b/components/dify/actions/send-chat-message/send-chat-message.mjs @@ -0,0 +1,63 @@ +// x-pd-ai: optimized +import dify from "../../dify.app.mjs"; + +export default { + key: "dify-send-chat-message", + name: "Send Chat Message", + description: "Send a message to a Dify Chatflow, Chatbot, or Legacy Agent app and get back the assistant's reply. Not supported for Agent apps — the Dify API requires `streaming` response mode for those, and this action always uses `blocking` mode to return a single synchronous result. Use **List Conversations** to find a `Conversation ID` to continue an existing thread instead of starting a new one. [See the documentation](https://docs.dify.ai/en/api-reference/chat-messages/send-chat-message)", + version: "0.0.1", + type: "action", + annotations: { + readOnlyHint: false, + destructiveHint: false, + openWorldHint: true, + }, + props: { + dify, + query: { + type: "string", + label: "Query", + description: "The user's message, e.g. `What are the specs of the iPhone 13 Pro Max?`", + }, + user: { + propDefinition: [ + dify, + "user", + ], + }, + conversationId: { + type: "string", + label: "Conversation ID", + description: "The ID of an existing conversation to continue. Omit this to start a new conversation — the response will include a new `conversation_id` to reuse on later calls for the same thread. Use **List Conversations** to find the ID of an existing conversation.", + optional: true, + }, + inputs: { + propDefinition: [ + dify, + "inputs", + ], + }, + autoGenerateName: { + type: "boolean", + label: "Auto Generate Name", + description: "Automatically generate a title for a new conversation. Defaults to `true`. Ignored when `Conversation ID` is set, since the conversation already has a name.", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dify.sendChatMessage({ + $, + data: { + query: this.query, + user: this.user, + conversation_id: this.conversationId, + inputs: this.inputs ?? {}, + auto_generate_name: this.autoGenerateName, + response_mode: "blocking", + }, + }); + + $.export("$summary", `Sent message and received a reply in conversation ${response.conversation_id}`); + return response; + }, +}; diff --git a/components/dify/dify.app.mjs b/components/dify/dify.app.mjs index ca3a408959c92..f5870462d81cd 100644 --- a/components/dify/dify.app.mjs +++ b/components/dify/dify.app.mjs @@ -1,11 +1,75 @@ +// x-pd-ai: optimized +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "dify", - propDefinitions: {}, + propDefinitions: { + user: { + type: "string", + label: "User", + description: "A unique identifier for the end user, defined by you (e.g. an internal user ID or session ID) — not a Dify account. Dify scopes conversations, messages, and files to this value, so reuse the same `User` across requests for the same end user. [See the documentation](https://docs.dify.ai/en/api-reference/guides/end-user-identity)", + }, + inputs: { + type: "object", + label: "Inputs", + description: "Values for the app's input variables, keyed by variable name, e.g. `{ \"city\": \"San Francisco\" }`. The variable names and types are defined by the app's configuration in the Dify console (**Orchestrate**/**Configure** tab), or can be retrieved by calling `GET /parameters` with the app's API key.", + optional: true, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api.dify.ai/v1"; + }, + _headers(headers) { + return { + Authorization: `Bearer ${this.$auth.api_key}`, + ...headers, + }; + }, + _makeRequest({ + $ = this, path, headers, ...args + } = {}) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: this._headers(headers), + ...args, + }); + }, + sendChatMessage(args = {}) { + return this._makeRequest({ + method: "POST", + path: "/chat-messages", + ...args, + }); + }, + runWorkflow(args = {}) { + return this._makeRequest({ + method: "POST", + path: "/workflows/run", + ...args, + }); + }, + listConversations(args = {}) { + return this._makeRequest({ + path: "/conversations", + ...args, + }); + }, + listDatasets(args = {}) { + return this._makeRequest({ + path: "/datasets", + ...args, + }); + }, + retrieveFromDataset({ + datasetId, ...args + }) { + return this._makeRequest({ + method: "POST", + path: `/datasets/${datasetId}/retrieve`, + ...args, + }); }, }, }; diff --git a/components/dify/package.json b/components/dify/package.json index 2721d6eb94956..0fc543fea57e5 100644 --- a/components/dify/package.json +++ b/components/dify/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/dify", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Dify Components", "main": "dify.app.mjs", "keywords": [ @@ -9,7 +9,10 @@ ], "homepage": "https://pipedream.com/apps/dify", "author": "Pipedream (https://pipedream.com/)", + "dependencies": { + "@pipedream/platform": "^3.1.1" + }, "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5e74586172b52..af4ff1615aae2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4378,7 +4378,11 @@ importers: specifier: ^1.6.8 version: 1.6.8 - components/dify: {} + components/dify: + dependencies: + '@pipedream/platform': + specifier: ^3.1.1 + version: 3.4.0 components/digicert: {} From f22ffe4ec5e4e559aa7609aeaf1bd348f5b220a0 Mon Sep 17 00:00:00 2001 From: Priyadharshan Date: Wed, 2 Sep 2026 12:48:01 +0530 Subject: [PATCH 2/6] feat(dify): enhance descriptions and validation for knowledge base actions --- .../list-knowledge-bases.mjs | 2 +- .../query-knowledge-base.mjs | 20 ++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs b/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs index 30a3969c50c7a..77ac26755c0fd 100644 --- a/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs +++ b/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs @@ -4,7 +4,7 @@ import dify from "../../dify.app.mjs"; export default { key: "dify-list-knowledge-bases", name: "List Knowledge Bases", - description: "List the knowledge bases (datasets) visible to your Dify account, optionally filtered by name. Use this to find the `Knowledge Base ID` needed by **Query Knowledge Base**. Requires a knowledge base API key, which is distinct from the app API key used by **Send Chat Message** and **Run Workflow**. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/list-knowledge-bases)", + description: "List the knowledge bases (datasets) visible to your Dify account, optionally filtered by name. Use this to find the `Knowledge Base ID` needed by **Query Knowledge Base**. Dify's knowledge base endpoints require a knowledge base API key (from a knowledge base's own **API Access** page), which is a different key from the app API key used by **Send Chat Message** and **Run Workflow** — connect a separate Dify account in the `Dify` prop below using that key if your existing connection uses an app key. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/list-knowledge-bases)", version: "0.0.1", type: "action", annotations: { diff --git a/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs b/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs index f621b94c80726..ff10789f864fc 100644 --- a/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs +++ b/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs @@ -12,7 +12,7 @@ const SEARCH_METHODS = [ export default { key: "dify-query-knowledge-base", name: "Query Knowledge Base", - description: "Search a Dify knowledge base (dataset) and return the chunks most relevant to a query. Requires a knowledge base API key, which is distinct from the app API key used by **Send Chat Message** and **Run Workflow**. Use **List Knowledge Bases** to find the `Knowledge Base ID`. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval)", + description: "Search a Dify knowledge base (dataset) and return the chunks most relevant to a query. Dify's knowledge base endpoints require a knowledge base API key (from a knowledge base's own **API Access** page), which is a different key from the app API key used by **Send Chat Message** and **Run Workflow** — connect a separate Dify account in the `Dify` prop below using that key if your existing connection uses an app key. Use **List Knowledge Bases** to find the `Knowledge Base ID`. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval)", version: "0.0.1", type: "action", annotations: { @@ -25,7 +25,7 @@ export default { datasetId: { type: "string", label: "Knowledge Base ID", - description: "The ID of the knowledge base to search. Use **List Knowledge Bases** to find valid IDs.", + description: "The UUID of the knowledge base to search, e.g. `c42e2a6e-40b3-4330-96f8-f1e4d768e8c9`. Use **List Knowledge Bases** to find valid IDs.", }, query: { type: "string", @@ -57,17 +57,23 @@ export default { throw new ConfigurationError("Query must be 250 characters or fewer."); } + let scoreThreshold; + if (this.scoreThreshold !== undefined) { + scoreThreshold = Number(this.scoreThreshold); + if (!Number.isFinite(scoreThreshold) || scoreThreshold < 0 || scoreThreshold > 1) { + throw new ConfigurationError("Score Threshold must be a number between 0 and 1."); + } + } + const useCustomRetrieval = this.searchMethod || this.topK !== undefined - || this.scoreThreshold !== undefined; + || scoreThreshold !== undefined; const retrievalModel = useCustomRetrieval && { search_method: this.searchMethod || "hybrid_search", reranking_enable: false, top_k: this.topK ?? 3, - score_threshold_enabled: this.scoreThreshold !== undefined, - score_threshold: this.scoreThreshold !== undefined - ? Number(this.scoreThreshold) - : undefined, + score_threshold_enabled: scoreThreshold !== undefined, + score_threshold: scoreThreshold, }; const response = await this.dify.retrieveFromDataset({ From 207765ca8592bffa0f1d577ec301568e156e9817 Mon Sep 17 00:00:00 2001 From: Priyadharshan Date: Wed, 2 Sep 2026 12:50:26 +0530 Subject: [PATCH 3/6] feat(dify): improve descriptions for knowledge base actions and input variables --- .../dify/actions/list-knowledge-bases/list-knowledge-bases.mjs | 2 +- .../dify/actions/query-knowledge-base/query-knowledge-base.mjs | 2 +- components/dify/dify.app.mjs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs b/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs index 77ac26755c0fd..0cc2a024771c8 100644 --- a/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs +++ b/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs @@ -4,7 +4,7 @@ import dify from "../../dify.app.mjs"; export default { key: "dify-list-knowledge-bases", name: "List Knowledge Bases", - description: "List the knowledge bases (datasets) visible to your Dify account, optionally filtered by name. Use this to find the `Knowledge Base ID` needed by **Query Knowledge Base**. Dify's knowledge base endpoints require a knowledge base API key (from a knowledge base's own **API Access** page), which is a different key from the app API key used by **Send Chat Message** and **Run Workflow** — connect a separate Dify account in the `Dify` prop below using that key if your existing connection uses an app key. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/list-knowledge-bases)", + description: "List the knowledge bases (datasets) visible to your Dify account, optionally filtered by name. Use this to find the `Knowledge Base ID` needed by **Query Knowledge Base**. This requires a Dify connection authenticated with a knowledge base API key (issued from a knowledge base's own **API Access** page), not an app API key — those authenticate **Send Chat Message** and **Run Workflow** instead. A `401 unauthorized` error here usually means the connected account is using an app key; reconnect with a knowledge base key instead. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/list-knowledge-bases)", version: "0.0.1", type: "action", annotations: { diff --git a/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs b/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs index ff10789f864fc..0aa59ac3271a3 100644 --- a/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs +++ b/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs @@ -12,7 +12,7 @@ const SEARCH_METHODS = [ export default { key: "dify-query-knowledge-base", name: "Query Knowledge Base", - description: "Search a Dify knowledge base (dataset) and return the chunks most relevant to a query. Dify's knowledge base endpoints require a knowledge base API key (from a knowledge base's own **API Access** page), which is a different key from the app API key used by **Send Chat Message** and **Run Workflow** — connect a separate Dify account in the `Dify` prop below using that key if your existing connection uses an app key. Use **List Knowledge Bases** to find the `Knowledge Base ID`. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval)", + description: "Search a Dify knowledge base (dataset) and return the chunks most relevant to a query. Use **List Knowledge Bases** to find the `Knowledge Base ID`. This requires a Dify connection authenticated with a knowledge base API key (issued from a knowledge base's own **API Access** page), not an app API key — those authenticate **Send Chat Message** and **Run Workflow** instead. A `401 unauthorized` error here usually means the connected account is using an app key; reconnect with a knowledge base key instead. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval)", version: "0.0.1", type: "action", annotations: { diff --git a/components/dify/dify.app.mjs b/components/dify/dify.app.mjs index f5870462d81cd..2c355c91f7191 100644 --- a/components/dify/dify.app.mjs +++ b/components/dify/dify.app.mjs @@ -13,7 +13,7 @@ export default { inputs: { type: "object", label: "Inputs", - description: "Values for the app's input variables, keyed by variable name, e.g. `{ \"city\": \"San Francisco\" }`. The variable names and types are defined by the app's configuration in the Dify console (**Orchestrate**/**Configure** tab), or can be retrieved by calling `GET /parameters` with the app's API key.", + description: "Values for the app's input variables, keyed by variable name, e.g. `{ \"city\": \"San Francisco\" }`. Leave empty (`{}`) if the app defines no input variables — most chat apps don't. The variable names and types are specific to how this particular Dify app was built, so if you don't already know them, ask the user which input variables their app expects rather than guessing; they can also be found on the app's **Orchestrate**/**Configure** tab in the Dify console.", optional: true, }, }, From ebeb5f3d6de259b6eb55cf7624488d92189dfc8a Mon Sep 17 00:00:00 2001 From: Priyadharshan Date: Wed, 2 Sep 2026 15:40:33 +0530 Subject: [PATCH 4/6] Add Dify Get App Parameters and List Messages actions --- .../get-app-parameters/get-app-parameters.mjs | 27 +++++++++ .../actions/list-messages/list-messages.mjs | 59 +++++++++++++++++++ components/dify/dify.app.mjs | 14 ++++- 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 components/dify/actions/get-app-parameters/get-app-parameters.mjs create mode 100644 components/dify/actions/list-messages/list-messages.mjs diff --git a/components/dify/actions/get-app-parameters/get-app-parameters.mjs b/components/dify/actions/get-app-parameters/get-app-parameters.mjs new file mode 100644 index 0000000000000..586dfbe718921 --- /dev/null +++ b/components/dify/actions/get-app-parameters/get-app-parameters.mjs @@ -0,0 +1,27 @@ +// x-pd-ai: optimized +import dify from "../../dify.app.mjs"; + +export default { + key: "dify-get-app-parameters", + name: "Get App Parameters", + description: "Return the connected Dify app's configuration: its `user_input_form` (the exact input variable names, types, and which are required), file-upload limits, opening statement, and suggested questions. Call this before **Send Chat Message** or **Run Workflow** to know what to pass in their `Inputs` parameter, instead of guessing variable names. [See the documentation](https://docs.dify.ai/en/api-reference/applications/get-app-parameters)", + version: "0.0.1", + type: "action", + annotations: { + readOnlyHint: true, + destructiveHint: false, + openWorldHint: true, + }, + props: { + dify, + }, + async run({ $ }) { + const response = await this.dify.getAppParameters({ + $, + }); + + const inputCount = response.user_input_form?.length ?? 0; + $.export("$summary", `Retrieved app parameters (${inputCount} input variable(s))`); + return response; + }, +}; diff --git a/components/dify/actions/list-messages/list-messages.mjs b/components/dify/actions/list-messages/list-messages.mjs new file mode 100644 index 0000000000000..4120e3994054b --- /dev/null +++ b/components/dify/actions/list-messages/list-messages.mjs @@ -0,0 +1,59 @@ +// x-pd-ai: optimized +import dify from "../../dify.app.mjs"; + +export default { + key: "dify-list-messages", + name: "List Messages", + description: "Return a Dify Chatflow, Chatbot, Agent, or Legacy Agent conversation's message history, newest first. Use **List Conversations** to find a `Conversation ID`. Each message includes the `query`/`answer` pair, so this is how an agent reconstructs prior turns of a conversation instead of relying on its own memory. [See the documentation](https://docs.dify.ai/en/api-reference/conversations/list-conversation-messages)", + version: "0.0.1", + type: "action", + annotations: { + readOnlyHint: true, + destructiveHint: false, + openWorldHint: true, + }, + props: { + dify, + conversationId: { + type: "string", + label: "Conversation ID", + description: "The ID of the conversation to read. Use **List Conversations** to find valid IDs.", + }, + user: { + propDefinition: [ + dify, + "user", + ], + description: "A unique identifier for the end user who owns this conversation. This must match the `User` value passed to **Send Chat Message** for the conversation to be visible.", + optional: true, + }, + firstId: { + type: "string", + label: "First Message ID", + description: "Pagination cursor: the `id` of the first (oldest) message on the current page. Pass it to fetch the previous, older page. Omit to fetch the most recent messages.", + optional: true, + }, + limit: { + type: "integer", + label: "Limit", + description: "Number of messages to return, between `1` and `100`. Defaults to `20`.", + min: 1, + max: 100, + optional: true, + }, + }, + async run({ $ }) { + const response = await this.dify.listMessages({ + $, + params: { + conversation_id: this.conversationId, + user: this.user, + first_id: this.firstId, + limit: this.limit, + }, + }); + + $.export("$summary", `Found ${response.data.length} message(s) in conversation ${this.conversationId}`); + return response; + }, +}; diff --git a/components/dify/dify.app.mjs b/components/dify/dify.app.mjs index 2c355c91f7191..5b342a167e1de 100644 --- a/components/dify/dify.app.mjs +++ b/components/dify/dify.app.mjs @@ -13,7 +13,7 @@ export default { inputs: { type: "object", label: "Inputs", - description: "Values for the app's input variables, keyed by variable name, e.g. `{ \"city\": \"San Francisco\" }`. Leave empty (`{}`) if the app defines no input variables — most chat apps don't. The variable names and types are specific to how this particular Dify app was built, so if you don't already know them, ask the user which input variables their app expects rather than guessing; they can also be found on the app's **Orchestrate**/**Configure** tab in the Dify console.", + description: "Values for the app's input variables, keyed by variable name, e.g. `{ \"city\": \"San Francisco\" }`. Leave empty (`{}`) if the app defines no input variables — most chat apps don't. Use **Get App Parameters** to discover this app's actual variable names and whether each is required.", optional: true, }, }, @@ -56,6 +56,18 @@ export default { ...args, }); }, + listMessages(args = {}) { + return this._makeRequest({ + path: "/messages", + ...args, + }); + }, + getAppParameters(args = {}) { + return this._makeRequest({ + path: "/parameters", + ...args, + }); + }, listDatasets(args = {}) { return this._makeRequest({ path: "/datasets", From fcc305b879caf556dae3ecb92905ed0ab6bd3201 Mon Sep 17 00:00:00 2001 From: Priyadharshan Date: Thu, 3 Sep 2026 12:08:53 +0530 Subject: [PATCH 5/6] Optimize Dify actions and clarify user field requirements - Add `ai: "optimized"` to Dify actions. - Update `user` field descriptions in `list-conversations` and `list-messages` to clarify that omitting the value results in an empty response rather than an error. --- .../dify/actions/get-app-parameters/get-app-parameters.mjs | 2 +- .../dify/actions/list-conversations/list-conversations.mjs | 5 ++--- .../actions/list-knowledge-bases/list-knowledge-bases.mjs | 2 +- components/dify/actions/list-messages/list-messages.mjs | 5 ++--- .../actions/query-knowledge-base/query-knowledge-base.mjs | 2 +- components/dify/actions/run-workflow/run-workflow.mjs | 2 +- .../dify/actions/send-chat-message/send-chat-message.mjs | 2 +- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/components/dify/actions/get-app-parameters/get-app-parameters.mjs b/components/dify/actions/get-app-parameters/get-app-parameters.mjs index 586dfbe718921..0dcaf7e3feef3 100644 --- a/components/dify/actions/get-app-parameters/get-app-parameters.mjs +++ b/components/dify/actions/get-app-parameters/get-app-parameters.mjs @@ -1,4 +1,3 @@ -// x-pd-ai: optimized import dify from "../../dify.app.mjs"; export default { @@ -6,6 +5,7 @@ export default { name: "Get App Parameters", description: "Return the connected Dify app's configuration: its `user_input_form` (the exact input variable names, types, and which are required), file-upload limits, opening statement, and suggested questions. Call this before **Send Chat Message** or **Run Workflow** to know what to pass in their `Inputs` parameter, instead of guessing variable names. [See the documentation](https://docs.dify.ai/en/api-reference/applications/get-app-parameters)", version: "0.0.1", + ai: "optimized", type: "action", annotations: { readOnlyHint: true, diff --git a/components/dify/actions/list-conversations/list-conversations.mjs b/components/dify/actions/list-conversations/list-conversations.mjs index b5d1da039fdd6..22d6abc21b2cf 100644 --- a/components/dify/actions/list-conversations/list-conversations.mjs +++ b/components/dify/actions/list-conversations/list-conversations.mjs @@ -1,4 +1,3 @@ -// x-pd-ai: optimized import dify from "../../dify.app.mjs"; export default { @@ -6,6 +5,7 @@ export default { name: "List Conversations", description: "List a Dify Chatflow, Chatbot, Agent, or Legacy Agent app's conversations, most recently active first. Conversations are scoped by `User`, so pass the same value used in **Send Chat Message** to see that end user's threads. [See the documentation](https://docs.dify.ai/en/api-reference/conversations/list-conversations)", version: "0.0.1", + ai: "optimized", type: "action", annotations: { readOnlyHint: true, @@ -19,8 +19,7 @@ export default { dify, "user", ], - description: "A unique identifier for the end user whose conversations to list. This must match the `User` value passed to **Send Chat Message** for those conversations to be visible.", - optional: true, + description: "A unique identifier for the end user whose conversations to list. This must match the `User` value passed to **Send Chat Message** for those conversations to be visible — Dify silently returns an empty page instead of an error when `User` is omitted.", }, lastId: { type: "string", diff --git a/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs b/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs index 0cc2a024771c8..c10319de44369 100644 --- a/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs +++ b/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs @@ -1,4 +1,3 @@ -// x-pd-ai: optimized import dify from "../../dify.app.mjs"; export default { @@ -6,6 +5,7 @@ export default { name: "List Knowledge Bases", description: "List the knowledge bases (datasets) visible to your Dify account, optionally filtered by name. Use this to find the `Knowledge Base ID` needed by **Query Knowledge Base**. This requires a Dify connection authenticated with a knowledge base API key (issued from a knowledge base's own **API Access** page), not an app API key — those authenticate **Send Chat Message** and **Run Workflow** instead. A `401 unauthorized` error here usually means the connected account is using an app key; reconnect with a knowledge base key instead. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/list-knowledge-bases)", version: "0.0.1", + ai: "optimized", type: "action", annotations: { readOnlyHint: true, diff --git a/components/dify/actions/list-messages/list-messages.mjs b/components/dify/actions/list-messages/list-messages.mjs index 4120e3994054b..5f97073332ef1 100644 --- a/components/dify/actions/list-messages/list-messages.mjs +++ b/components/dify/actions/list-messages/list-messages.mjs @@ -1,4 +1,3 @@ -// x-pd-ai: optimized import dify from "../../dify.app.mjs"; export default { @@ -6,6 +5,7 @@ export default { name: "List Messages", description: "Return a Dify Chatflow, Chatbot, Agent, or Legacy Agent conversation's message history, newest first. Use **List Conversations** to find a `Conversation ID`. Each message includes the `query`/`answer` pair, so this is how an agent reconstructs prior turns of a conversation instead of relying on its own memory. [See the documentation](https://docs.dify.ai/en/api-reference/conversations/list-conversation-messages)", version: "0.0.1", + ai: "optimized", type: "action", annotations: { readOnlyHint: true, @@ -24,8 +24,7 @@ export default { dify, "user", ], - description: "A unique identifier for the end user who owns this conversation. This must match the `User` value passed to **Send Chat Message** for the conversation to be visible.", - optional: true, + description: "A unique identifier for the end user who owns this conversation. This must match the `User` value passed to **Send Chat Message** for the conversation to be visible — Dify silently returns an empty page instead of an error when `User` is omitted.", }, firstId: { type: "string", diff --git a/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs b/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs index 0aa59ac3271a3..f02f28c692a8b 100644 --- a/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs +++ b/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs @@ -1,4 +1,3 @@ -// x-pd-ai: optimized import { ConfigurationError } from "@pipedream/platform"; import dify from "../../dify.app.mjs"; @@ -14,6 +13,7 @@ export default { name: "Query Knowledge Base", description: "Search a Dify knowledge base (dataset) and return the chunks most relevant to a query. Use **List Knowledge Bases** to find the `Knowledge Base ID`. This requires a Dify connection authenticated with a knowledge base API key (issued from a knowledge base's own **API Access** page), not an app API key — those authenticate **Send Chat Message** and **Run Workflow** instead. A `401 unauthorized` error here usually means the connected account is using an app key; reconnect with a knowledge base key instead. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval)", version: "0.0.1", + ai: "optimized", type: "action", annotations: { readOnlyHint: true, diff --git a/components/dify/actions/run-workflow/run-workflow.mjs b/components/dify/actions/run-workflow/run-workflow.mjs index 42465b9bffde5..157406c5c95b9 100644 --- a/components/dify/actions/run-workflow/run-workflow.mjs +++ b/components/dify/actions/run-workflow/run-workflow.mjs @@ -1,4 +1,3 @@ -// x-pd-ai: optimized import dify from "../../dify.app.mjs"; export default { @@ -6,6 +5,7 @@ export default { name: "Run Workflow", description: "Run a Dify Workflow app's published workflow and return its outputs. Requires the workflow to be published — draft-only workflows return a `bad_request` error. This action uses `blocking` response mode, which waits for the run to finish before returning; long-running workflows on Dify Cloud risk being cut off by the platform's 100-second edge proxy timeout, in which case the run may still complete server-side but this action will not see the result. [See the documentation](https://docs.dify.ai/en/api-reference/workflow-runs/run-workflow)", version: "0.0.1", + ai: "optimized", type: "action", annotations: { readOnlyHint: false, diff --git a/components/dify/actions/send-chat-message/send-chat-message.mjs b/components/dify/actions/send-chat-message/send-chat-message.mjs index d21226eb91e4b..8e78ef5ea0080 100644 --- a/components/dify/actions/send-chat-message/send-chat-message.mjs +++ b/components/dify/actions/send-chat-message/send-chat-message.mjs @@ -1,4 +1,3 @@ -// x-pd-ai: optimized import dify from "../../dify.app.mjs"; export default { @@ -6,6 +5,7 @@ export default { name: "Send Chat Message", description: "Send a message to a Dify Chatflow, Chatbot, or Legacy Agent app and get back the assistant's reply. Not supported for Agent apps — the Dify API requires `streaming` response mode for those, and this action always uses `blocking` mode to return a single synchronous result. Use **List Conversations** to find a `Conversation ID` to continue an existing thread instead of starting a new one. [See the documentation](https://docs.dify.ai/en/api-reference/chat-messages/send-chat-message)", version: "0.0.1", + ai: "optimized", type: "action", annotations: { readOnlyHint: false, From fd809051161f6db64532e80aeebd956aa7da0ffe Mon Sep 17 00:00:00 2001 From: Priyadharshan Date: Thu, 3 Sep 2026 12:45:25 +0530 Subject: [PATCH 6/6] Remove Send Chat Message action and update documentation --- .../get-app-parameters/get-app-parameters.mjs | 2 +- .../list-conversations/list-conversations.mjs | 4 +- .../list-knowledge-bases.mjs | 2 +- .../actions/list-messages/list-messages.mjs | 2 +- .../query-knowledge-base.mjs | 2 +- .../send-chat-message/send-chat-message.mjs | 63 ------------------- components/dify/dify.app.mjs | 7 --- 7 files changed, 6 insertions(+), 76 deletions(-) delete mode 100644 components/dify/actions/send-chat-message/send-chat-message.mjs diff --git a/components/dify/actions/get-app-parameters/get-app-parameters.mjs b/components/dify/actions/get-app-parameters/get-app-parameters.mjs index 0dcaf7e3feef3..3d482b8f7f803 100644 --- a/components/dify/actions/get-app-parameters/get-app-parameters.mjs +++ b/components/dify/actions/get-app-parameters/get-app-parameters.mjs @@ -3,7 +3,7 @@ import dify from "../../dify.app.mjs"; export default { key: "dify-get-app-parameters", name: "Get App Parameters", - description: "Return the connected Dify app's configuration: its `user_input_form` (the exact input variable names, types, and which are required), file-upload limits, opening statement, and suggested questions. Call this before **Send Chat Message** or **Run Workflow** to know what to pass in their `Inputs` parameter, instead of guessing variable names. [See the documentation](https://docs.dify.ai/en/api-reference/applications/get-app-parameters)", + description: "Return the connected Dify app's configuration: its `user_input_form` (the exact input variable names, types, and which are required), file-upload limits, opening statement, and suggested questions. Call this before **Run Workflow** to know what to pass in its `Inputs` parameter, instead of guessing variable names. [See the documentation](https://docs.dify.ai/en/api-reference/applications/get-app-parameters)", version: "0.0.1", ai: "optimized", type: "action", diff --git a/components/dify/actions/list-conversations/list-conversations.mjs b/components/dify/actions/list-conversations/list-conversations.mjs index 22d6abc21b2cf..e4b5ad3604d22 100644 --- a/components/dify/actions/list-conversations/list-conversations.mjs +++ b/components/dify/actions/list-conversations/list-conversations.mjs @@ -3,7 +3,7 @@ import dify from "../../dify.app.mjs"; export default { key: "dify-list-conversations", name: "List Conversations", - description: "List a Dify Chatflow, Chatbot, Agent, or Legacy Agent app's conversations, most recently active first. Conversations are scoped by `User`, so pass the same value used in **Send Chat Message** to see that end user's threads. [See the documentation](https://docs.dify.ai/en/api-reference/conversations/list-conversations)", + description: "List a Dify Chatflow, Chatbot, Agent, or Legacy Agent app's conversations, most recently active first. Conversations are scoped by `User`, so pass the same value used to create those conversations to see that end user's threads. [See the documentation](https://docs.dify.ai/en/api-reference/conversations/list-conversations)", version: "0.0.1", ai: "optimized", type: "action", @@ -19,7 +19,7 @@ export default { dify, "user", ], - description: "A unique identifier for the end user whose conversations to list. This must match the `User` value passed to **Send Chat Message** for those conversations to be visible — Dify silently returns an empty page instead of an error when `User` is omitted.", + description: "A unique identifier for the end user whose conversations to list. This must match the `User` value used when those conversations were created — Dify silently returns an empty page instead of an error when `User` is omitted.", }, lastId: { type: "string", diff --git a/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs b/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs index c10319de44369..d13b441dba140 100644 --- a/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs +++ b/components/dify/actions/list-knowledge-bases/list-knowledge-bases.mjs @@ -3,7 +3,7 @@ import dify from "../../dify.app.mjs"; export default { key: "dify-list-knowledge-bases", name: "List Knowledge Bases", - description: "List the knowledge bases (datasets) visible to your Dify account, optionally filtered by name. Use this to find the `Knowledge Base ID` needed by **Query Knowledge Base**. This requires a Dify connection authenticated with a knowledge base API key (issued from a knowledge base's own **API Access** page), not an app API key — those authenticate **Send Chat Message** and **Run Workflow** instead. A `401 unauthorized` error here usually means the connected account is using an app key; reconnect with a knowledge base key instead. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/list-knowledge-bases)", + description: "List the knowledge bases (datasets) visible to your Dify account, optionally filtered by name. Use this to find the `Knowledge Base ID` needed by **Query Knowledge Base**. This requires a Dify connection authenticated with a knowledge base API key (issued from a knowledge base's own **API Access** page), not an app API key — those authenticate **Run Workflow** instead. A `401 unauthorized` error here usually means the connected account is using an app key; reconnect with a knowledge base key instead. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/list-knowledge-bases)", version: "0.0.1", ai: "optimized", type: "action", diff --git a/components/dify/actions/list-messages/list-messages.mjs b/components/dify/actions/list-messages/list-messages.mjs index 5f97073332ef1..d2f9880a9e439 100644 --- a/components/dify/actions/list-messages/list-messages.mjs +++ b/components/dify/actions/list-messages/list-messages.mjs @@ -24,7 +24,7 @@ export default { dify, "user", ], - description: "A unique identifier for the end user who owns this conversation. This must match the `User` value passed to **Send Chat Message** for the conversation to be visible — Dify silently returns an empty page instead of an error when `User` is omitted.", + description: "A unique identifier for the end user who owns this conversation. This must match the `User` value used when the conversation was created — Dify silently returns an empty page instead of an error when `User` is omitted.", }, firstId: { type: "string", diff --git a/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs b/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs index f02f28c692a8b..f0335a1403cdb 100644 --- a/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs +++ b/components/dify/actions/query-knowledge-base/query-knowledge-base.mjs @@ -11,7 +11,7 @@ const SEARCH_METHODS = [ export default { key: "dify-query-knowledge-base", name: "Query Knowledge Base", - description: "Search a Dify knowledge base (dataset) and return the chunks most relevant to a query. Use **List Knowledge Bases** to find the `Knowledge Base ID`. This requires a Dify connection authenticated with a knowledge base API key (issued from a knowledge base's own **API Access** page), not an app API key — those authenticate **Send Chat Message** and **Run Workflow** instead. A `401 unauthorized` error here usually means the connected account is using an app key; reconnect with a knowledge base key instead. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval)", + description: "Search a Dify knowledge base (dataset) and return the chunks most relevant to a query. Use **List Knowledge Bases** to find the `Knowledge Base ID`. This requires a Dify connection authenticated with a knowledge base API key (issued from a knowledge base's own **API Access** page), not an app API key — those authenticate **Run Workflow** instead. A `401 unauthorized` error here usually means the connected account is using an app key; reconnect with a knowledge base key instead. [See the documentation](https://docs.dify.ai/en/api-reference/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval)", version: "0.0.1", ai: "optimized", type: "action", diff --git a/components/dify/actions/send-chat-message/send-chat-message.mjs b/components/dify/actions/send-chat-message/send-chat-message.mjs deleted file mode 100644 index 8e78ef5ea0080..0000000000000 --- a/components/dify/actions/send-chat-message/send-chat-message.mjs +++ /dev/null @@ -1,63 +0,0 @@ -import dify from "../../dify.app.mjs"; - -export default { - key: "dify-send-chat-message", - name: "Send Chat Message", - description: "Send a message to a Dify Chatflow, Chatbot, or Legacy Agent app and get back the assistant's reply. Not supported for Agent apps — the Dify API requires `streaming` response mode for those, and this action always uses `blocking` mode to return a single synchronous result. Use **List Conversations** to find a `Conversation ID` to continue an existing thread instead of starting a new one. [See the documentation](https://docs.dify.ai/en/api-reference/chat-messages/send-chat-message)", - version: "0.0.1", - ai: "optimized", - type: "action", - annotations: { - readOnlyHint: false, - destructiveHint: false, - openWorldHint: true, - }, - props: { - dify, - query: { - type: "string", - label: "Query", - description: "The user's message, e.g. `What are the specs of the iPhone 13 Pro Max?`", - }, - user: { - propDefinition: [ - dify, - "user", - ], - }, - conversationId: { - type: "string", - label: "Conversation ID", - description: "The ID of an existing conversation to continue. Omit this to start a new conversation — the response will include a new `conversation_id` to reuse on later calls for the same thread. Use **List Conversations** to find the ID of an existing conversation.", - optional: true, - }, - inputs: { - propDefinition: [ - dify, - "inputs", - ], - }, - autoGenerateName: { - type: "boolean", - label: "Auto Generate Name", - description: "Automatically generate a title for a new conversation. Defaults to `true`. Ignored when `Conversation ID` is set, since the conversation already has a name.", - optional: true, - }, - }, - async run({ $ }) { - const response = await this.dify.sendChatMessage({ - $, - data: { - query: this.query, - user: this.user, - conversation_id: this.conversationId, - inputs: this.inputs ?? {}, - auto_generate_name: this.autoGenerateName, - response_mode: "blocking", - }, - }); - - $.export("$summary", `Sent message and received a reply in conversation ${response.conversation_id}`); - return response; - }, -}; diff --git a/components/dify/dify.app.mjs b/components/dify/dify.app.mjs index 5b342a167e1de..f92da3fc35a2c 100644 --- a/components/dify/dify.app.mjs +++ b/components/dify/dify.app.mjs @@ -36,13 +36,6 @@ export default { ...args, }); }, - sendChatMessage(args = {}) { - return this._makeRequest({ - method: "POST", - path: "/chat-messages", - ...args, - }); - }, runWorkflow(args = {}) { return this._makeRequest({ method: "POST",