From 081a109d369966182e5d6e4ff3ab38bb8512b498 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期三, 20 十一月 2024 15:59:01 +0800
Subject: [PATCH] 优化
---
app/task/fetch_agent.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/app/task/fetch_agent.py b/app/task/fetch_agent.py
index be0e07c..b8aacd4 100644
--- a/app/task/fetch_agent.py
+++ b/app/task/fetch_agent.py
@@ -106,10 +106,13 @@
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')
]
--
Gitblit v1.8.0