Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix a bug in agent api (#3551)

liuhua85dd9fde43a0
diff --git a/sdk/python/ragflow_sdk/modules/agent.py b/sdk/python/ragflow_sdk/modules/agent.py
index 682a4692cb..a6b52e2c22 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"))