### 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>tags/v0.14.0
| @@ -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")) | |||