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 +++++--
 app/api/files.py |    3 ++-
 2 files changed, 7 insertions(+), 3 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 = ""
diff --git a/app/api/files.py b/app/api/files.py
index 44b8462..4be3304 100644
--- a/app/api/files.py
+++ b/app/api/files.py
@@ -91,7 +91,8 @@
             return Response(code=200, msg="", data=result)
 
         elif agent_id == "basic_paper_agent":
-            service = BasicService(base_url=settings.basic_paper_url)
+            ...
+            # service = BasicService(base_url=settings.basic_paper_url)
             # result = await service.paper_file_upload(chat_id, file.filename, file_content)
 
     elif agent.agent_type == AgentType.DIFY:

--
Gitblit v1.8.0