From 041b39822581c623721b09b892c37573573ab816 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期三, 04 十二月 2024 09:33:46 +0800
Subject: [PATCH] 文档报告生成
---
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