From 85dd9fde43a0976dce030e11a5c87a21f974c0dc Mon Sep 17 00:00:00 2001 From: liuhua <10215101452@stu.ecnu.edu.cn> Date: Thu, 21 Nov 2024 12:45:22 +0800 Subject: [PATCH] Fix a bug in agent api (#3551) ### What problem does this PR solve? Fix a bug in agent api #3539 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn> --- sdk/python/ragflow_sdk/modules/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/ragflow_sdk/modules/agent.py b/sdk/python/ragflow_sdk/modules/agent.py index 682a4692..a6b52e2c 100644 --- a/sdk/python/ragflow_sdk/modules/agent.py +++ b/sdk/python/ragflow_sdk/modules/agent.py @@ -51,7 +51,7 @@ class Agent(Base): @staticmethod def create_session(id,rag) -> Session: - res = requests.post(f"http://127.0.0.1:9380/api/v1/agents/{id}/sessions",headers={"Authorization": f"Bearer {rag.user_key}"},json={}) + res = requests.post(f"{rag.api_url}/agents/{id}/sessions",headers={"Authorization": f"Bearer {rag.user_key}"},json={}) res = res.json() if res.get("code") == 0: return Session(rag,res.get("data"))