mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-23 22:50:17 +08:00
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>
This commit is contained in:
parent
c7c8b3812f
commit
85dd9fde43
@ -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"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user