mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Add sdk for list agents and sessions (#3848)
### What problem does this PR solve? Add sdk for list agents and sessions ### Type of change - [x] New Feature (non-breaking change which adds functionality) Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
This commit is contained in:
@ -8,12 +8,12 @@ class Session(Base):
|
||||
self.id = None
|
||||
self.name = "New session"
|
||||
self.messages = [{"role": "assistant", "content": "Hi! I am your assistant,can I help you?"}]
|
||||
self.chat_id = None
|
||||
self.agent_id = None
|
||||
for key,value in res_dict.items():
|
||||
if key =="chat_id" and value is not None:
|
||||
self.chat_id = None
|
||||
self.__session_type = "chat"
|
||||
if key == "agent_id" and value is not None:
|
||||
self.agent_id = None
|
||||
self.__session_type = "agent"
|
||||
super().__init__(rag, res_dict)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user