絵文字変換

This commit is contained in:
2024-02-18 21:22:51 +09:00
parent 6524158f42
commit 1b1fcd44e6
+2 -1
View File
@@ -12,6 +12,7 @@ from common_module import CommonModule
from youtube import *
from datetime import datetime
import json
import emoji
class Main:
@@ -48,7 +49,7 @@ class Main:
if chat_items:
chat_item = random.choice (chat_items)
chat_item.author = chat_item.author.__dict__
message: str = chat_item.message
message: str = emoji.emojize (chat_item.message)
answer: str = Talk.main (message, chat_item.author['name'], histories).replace ('\n', ' ')
histories = (histories
+ [{'role': 'user', 'content': message},