完善接口,实现对DIFY前端消息流传输的支持

This commit is contained in:
2024-08-29 08:26:59 +08:00
parent 9b47e1a6e1
commit 131d6ef1d1
2 changed files with 37 additions and 26 deletions
+3 -3
View File
@@ -18,13 +18,13 @@ class conversations:
return datas
def get(self,user_id:str,id:str = ''):
records = dbManage.query(self._tableName,user_id = user_id,id=id)
def get(self, id:str):
records = dbManage.query(self._tableName, id=id)
if len(records) >0:
return records[0]
return None
def add(self,user_id:str,name:str,id:str = ''):
def add(self,id:str, user_id:str, name:str):
template = BaseConfig.ConversationCfg
template['id'] = id
template['user_id'] = user_id