From 27e3d6bb4cb203e55a44db03fdfc9acbf05c35af Mon Sep 17 00:00:00 2001
From: xuyonghao <898441624@qq.com>
Date: 星期三, 04 十二月 2024 15:08:13 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 app/api/chat.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/api/chat.py b/app/api/chat.py
index 2cfbf20..3b14b8b 100644
--- a/app/api/chat.py
+++ b/app/api/chat.py
@@ -426,16 +426,19 @@
                         except Exception as e:
                             logger.error(e)
                         inputs = {
-                            "input_files": []
                         }
+                        files = []
                         for file in upload_files:
-                            inputs["input_files"].append({
+                            files.append({
                                 "type": "document",
                                 "transfer_method": "local_file",
                                 "url": "",
                                 "upload_file_id": file
                             })
+                        if workflow_type == 1:
+                            inputs["input_files"] = files
                         if workflow_type == 2:
+                            inputs["file_list"] = files
                             inputs["Completion_of_main_indicators"] = title
                             token = settings.dify_workflow_report
                         complete_response = ""

--
Gitblit v1.8.0