From a791022ff1311e1fb76930c398d6ff91036d0456 Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期三, 11 十二月 2024 17:57:52 +0800 Subject: [PATCH] 新增加标签功能 --- app/api/agent.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/agent.py b/app/api/agent.py index 22ce8ef..2bde98c 100644 --- a/app/api/agent.py +++ b/app/api/agent.py @@ -42,7 +42,7 @@ if agent.agent_type == AgentType.RAGFLOW: ragflow_service = RagflowService(base_url=settings.fwr_base_url) try: - token = get_ragflow_token(db, current_user.id) + token = await get_ragflow_token(db, current_user.id) result = await ragflow_service.get_chat_sessions(token, agent_id) if not result: result = await get_session_history(db, current_user.id, agent_id) @@ -53,7 +53,7 @@ elif agent.agent_type == AgentType.BISHENG: bisheng_service = BishengService(base_url=settings.sgb_base_url) try: - token = get_bisheng_token(db, current_user.id) + token = await get_bisheng_token(db, current_user.id) result = await bisheng_service.get_chat_sessions(token, agent_id, page, limit) except Exception as e: raise HTTPException(status_code=500, detail=str(e)) @@ -84,7 +84,7 @@ if agent.agent_type == AgentType.RAGFLOW: ragflow_service = RagflowService(base_url=settings.fwr_base_url) try: - token = get_ragflow_token(db, current_user.id) + token = await get_ragflow_token(db, current_user.id) result = await ragflow_service.get_session_log(token, conversation_id) if 'session_log' in result and 'reference' in result: combined_logs = [] @@ -118,7 +118,7 @@ is_join = True bisheng_service = BishengService(base_url=settings.sgb_base_url) try: - token = get_bisheng_token(db, current_user.id) + token = await get_bisheng_token(db, current_user.id) result = await bisheng_service.get_session_log(token, agent_id, conversation_id) combined_logs = [] last_question = None -- Gitblit v1.8.0