From 0ad20a631808fcc255a8739d0ea27bfe044f4ea0 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 22 十一月 2024 17:07:31 +0800
Subject: [PATCH] 请求basic_agent换成requests库,保存消息是不再保存中间结果
---
app/task/fetch_agent.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/app/task/fetch_agent.py b/app/task/fetch_agent.py
index be0e07c..a39461a 100644
--- a/app/task/fetch_agent.py
+++ b/app/task/fetch_agent.py
@@ -106,12 +106,17 @@
def initialize_agents():
db = SessionLocal()
try:
+ count = db.query(AgentModel).count()
+ if count > 0:
+ return
initial_agents = [
('80ee430a-e396-48c4-a12c-7c7cdf5eda51', 1, '鎶ュ憡鐢熸垚', 'BISHENG', 'report'),
('basic_excel_merge', 2, '鎶ヨ〃鍚堝苟', 'BASIC', 'excelMerge'),
- ('bfd090d589d811efb3630242ac190006', 4, '鏂囨。鏅鸿兘', 'RAGFLOW', 'documentChat'),
+ ('bfd090d589d811efb3630242ac190006', 4, '鏂囨。鏅鸿兘', 'BISHENG', 'report'),
('da3451da89d911efb9490242ac190006', 3, '鐭ヨ瘑闂瓟', 'RAGFLOW', 'knowledgeQA'),
- ('e96eb7a589db11ef87d20242ac190006', 5, '鏅鸿兘闂瓟', 'RAGFLOW', 'chat')
+ ('e96eb7a589db11ef87d20242ac190006', 5, '鏅鸿兘闂瓟', 'RAGFLOW', 'chat'),
+ ('basic_excel_talk', 6, '鏅鸿兘鏁版嵁', 'BASIC', 'excelTalk'),
+ ('basic_question_talk', 7, '鏂囨。鍑哄嵎', 'BASIC', 'questionTalk')
]
for agent in initial_agents:
--
Gitblit v1.8.0