|
@@ -143,7 +143,15 @@ async def history_input():
|
|
|
async def log_test(req:request2):
|
|
|
db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/AI_anchor?charset=utf8mb4')
|
|
|
log_table = db['history_input']
|
|
|
- pk = log_table.insert({'name':req.name,'text_content':req.text_content,'image_urls':req.image_urls})
|
|
|
+ txt_content_seperate_by_dot = ''
|
|
|
+ for txt in text_content:
|
|
|
+ txt_content_seperate_by_dot += txt+","
|
|
|
+ txt_content_seperate_by_dot = txt_content_seperate_by_dot[:-1]
|
|
|
+ img_urls_seperate_by_dot = ''
|
|
|
+ for iurl in image_urls:
|
|
|
+ img_urls_seperate_by_dot += iurl+","
|
|
|
+ img_urls_seperate_by_dot[:-1]
|
|
|
+ pk = log_table.insert({'name':req.name,'text_content':txt_content_seperate_by_dot,'image_urls':img_urls_seperate_by_dot})
|
|
|
return pk
|
|
|
|
|
|
def notify_group(msg):
|