浏览代码

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>
tags/v0.14.0
liuhua 11 个月前
父节点
当前提交
85dd9fde43
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      sdk/python/ragflow_sdk/modules/agent.py

+ 1
- 1
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"))

正在加载...
取消
保存