修改ID为空的问题

This commit is contained in:
wanyaokun
2024-08-26 20:16:58 +08:00
parent 1704b61609
commit 33b2281b7b
+3
View File
@@ -27,6 +27,9 @@ class conversations:
return None
def add(self,user_id:str,name:str,id:str = ''):
import uuid
if id == '':
id= str(uuid.uuid4())
template = BaseConfig.ConversationCfg
template['id'] = id
template['user_id'] = user_id