zhangqian
2024-11-14 a27d23e9d7dde3a220795828971f480850c22b8f
文档智能改成毕昇的,去除毕昇文档回答的重复消息
3个文件已修改
18 ■■■■■ 已修改文件
app/api/report.py 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/config/config.yaml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/task/fetch_agent.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/api/report.py
@@ -65,16 +65,19 @@
                    files = data.get("files", [])
                    steps = data.get("intermediate_steps", "")
                    msg = data.get("message", "")
                    category = data.get("category", "")
                    if len(files) != 0 or (steps and last_message == "step") or msg or data["type"] == "close":
                    if len(files) != 0 or (msg and category != "answer") or data["type"] == "close":
                        if data["type"] == "close":
                            t = "close"
                        else:
                            t = "stream"
                        process_files(files, agent_id)
                        result = {"step_message": steps, "message": msg, "type": t, "files": files}
                        result = {"message": msg, "type": t, "files": files}
                        await websocket.send_json(result)
                        print(f"Forwarded to client, {chat_id}: {result}")
                    elif steps and last_message == "step":
                        result = {"step_message": steps, "type": "stream", "files": files}
                        await websocket.send_json(result)
                    last_message = "message" if msg else "step"
@@ -90,7 +93,8 @@
                task.cancel()
                try:
                    await task
                except asyncio.CancelledError:
                except asyncio.CancelledError as e:
                    print(f"asyncio CancelledError: {e}")
                    pass
        except WebSocketDisconnect as e:
app/config/config.yaml
@@ -10,5 +10,5 @@
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArq9XTUSeYr2+N1h3Afl/z8Dse/2yD0ZGrKwx+EEEcdsBLca9Ynmx3nIB5obmLlSfmskLpBo0UACBmB5rEjBp2Q2f3AG3Hjd4B+gNCG6BDaawuDlgANIhGnaTLrIqWrrcm4EMzJOnAOI1fgzJRsOOUEfaS318Eq9OVO3apEyCCt0lOQK6PuksduOjVxtltDav+guVAA068NrPYmRNabVKRNLJpL8w4D44sfth5RvZ3q9t+6RTArpEtc5sh5ChzvqPOzKGMXW83C95TxmXqpbK6olN4RevSfVjEAgCydH6HN6OhtOQEcnrU97r9H0iZOWwbw3pVrZiUkuRD1R56Wzs2wIDAQAB
  -----END PUBLIC KEY-----
PRIVATE_KEY: str
fetch_sgb_agent: 报告生成
fetch_fwr_agent: 知识问答,文档智能,智能问答
fetch_sgb_agent: 报告生成,文档智能
fetch_fwr_agent: 知识问答,智能问答
app/task/fetch_agent.py
@@ -112,7 +112,7 @@
        initial_agents = [
            ('80ee430a-e396-48c4-a12c-7c7cdf5eda51', 1, '报告生成', 'BISHENG', 'report'),
            ('basic_excel_merge', 2, '报表合并', 'BASIC', 'excelMerge'),
            ('bfd090d589d811efb3630242ac190006', 4, '文档智能', 'RAGFLOW', 'documentChat'),
            ('bfd090d589d811efb3630242ac190006', 4, '文档智能', 'BISHENG', 'documentChat'),
            ('da3451da89d911efb9490242ac190006', 3, '知识问答', 'RAGFLOW', 'knowledgeQA'),
            ('e96eb7a589db11ef87d20242ac190006', 5, '智能问答', 'RAGFLOW', 'chat')
        ]