From 757d2a394797c1b5d560811e58bb8eaccf7b7fbb Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Fri, 11 Apr 2025 17:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=E6=9B=B4=E6=96=B0=20Dify?= =?UTF-8?q?=20API=20=E7=B1=BB=E5=9E=8B=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9=20Chatflow=20=E5=BA=94=E7=94=A8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/config/default.py | 4 ++-- astrbot/core/provider/sources/dify_source.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 648b2bc9a..459ff622a 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -928,8 +928,8 @@ CONFIG_METADATA_2 = { "dify_api_type": { "description": "Dify 应用类型", "type": "string", - "hint": "Dify API 类型。根据 Dify 官网,目前支持 chat, agent, workflow 三种应用类型", - "options": ["chat", "agent", "workflow"], + "hint": "Dify API 类型。根据 Dify 官网,目前支持 chat, chatflow, agent, workflow 三种应用类型。", + "options": ["chat", "chatflow", "agent", "workflow"], }, "dify_workflow_output_key": { "description": "Dify Workflow 输出变量名", diff --git a/astrbot/core/provider/sources/dify_source.py b/astrbot/core/provider/sources/dify_source.py index 1adb0f884..78e3760c1 100644 --- a/astrbot/core/provider/sources/dify_source.py +++ b/astrbot/core/provider/sources/dify_source.py @@ -102,7 +102,7 @@ class ProviderDify(Provider): try: match self.api_type: - case "chat" | "agent": + case "chat" | "agent" | "chatflow": if not prompt: prompt = "请描述这张图片。"