Skip to content

Commit

Permalink
Fix a bug in agent api (infiniflow#3551)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

Fix a bug in agent api
infiniflow#3539

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: liuhua <[email protected]>
  • Loading branch information
Feiue and liuhua authored Nov 21, 2024
1 parent c7c8b38 commit 85dd9fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/python/ragflow_sdk/modules/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(self,rag,res_dict):

@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"))
Expand Down

0 comments on commit 85dd9fd

Please sign in to comment.