From 0897e36de45df26ab185568a0e747f223afb9910 Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期四, 28 十一月 2024 13:44:46 +0800 Subject: [PATCH] bisheng的历史会话添加智能体过滤 --- app/api/agent.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/app/api/agent.py b/app/api/agent.py index b8c1b9d..2f27f23 100644 --- a/app/api/agent.py +++ b/app/api/agent.py @@ -53,7 +53,7 @@ bisheng_service = BishengService(base_url=settings.sgb_base_url) try: token = get_bisheng_token(db, current_user.id) - result = await bisheng_service.get_chat_sessions(token, page, limit) + result = await bisheng_service.get_chat_sessions(token, agent_id, page, limit) except Exception as e: raise HTTPException(status_code=500, detail=str(e)) return ResponseList(code=200, msg="", data=result) @@ -181,6 +181,8 @@ if "file_name" in i.get("content", {}): tmp_data["files"] = [{"file_name": i.get("content", {}).get("file_name"), "file_url": i.get("content", {}).get("file_url")}] + if "images" in i.get("content", {}): + tmp_data["images"] = i.get("content", {}).get("images") else: tmp_data["answer"] = i.get("content") data.append(tmp_data) -- Gitblit v1.8.0