From 330cb95f8227a2e2e4968a8c8b2c6508b162e9c6 Mon Sep 17 00:00:00 2001 From: liuwei Date: Mon, 7 Apr 2025 16:47:13 +0800 Subject: [PATCH] =?UTF-8?q?dify=20=E6=94=AF=E6=8C=81=E5=9B=BE=E7=89=87http?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=EF=BC=8C=E6=96=B9=E4=BE=BF=E9=9A=8F=E6=97=B6?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0API=EF=BC=8C=E6=B7=BB=E5=8A=A0video=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/dify/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/dify/main.py b/plugins/dify/main.py index caa8c37..6d59070 100644 --- a/plugins/dify/main.py +++ b/plugins/dify/main.py @@ -270,6 +270,11 @@ class DifyPlugin(MessagePluginInterface): image_url = outputs["result"] image_path = downloader.download_media(image_url) answer = image_path + if outputs["type"] == "video": + downloader = MediaDownloader() + image_url = outputs["result"] + image_path = downloader.download_media(image_url) + answer = image_path # 处理文本类型返回 elif "text" in outputs and isinstance(outputs["text"], str): answer = outputs["text"]