zhaoqingang
2024-11-25 0fdc313d69ace003366ab519714158343d178acc
app/task/fetch_agent.py
@@ -106,12 +106,18 @@
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'),
            ('9d75142a-66eb-4e23-b7d4-03efe4584915', 8, '小数绘图', 'DIFY', 'imageTalk')
        ]
        for agent in initial_agents: