Browse Source

絵文字変換

othello
みてるぞ 7 months ago
parent
commit
1b1fcd44e6
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      main.py

+ 2
- 1
main.py View File

@@ -12,6 +12,7 @@ from common_module import CommonModule
from youtube import * from youtube import *
from datetime import datetime from datetime import datetime
import json import json
import emoji




class Main: class Main:
@@ -48,7 +49,7 @@ class Main:
if chat_items: if chat_items:
chat_item = random.choice (chat_items) chat_item = random.choice (chat_items)
chat_item.author = chat_item.author.__dict__ 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', ' ') answer: str = Talk.main (message, chat_item.author['name'], histories).replace ('\n', ' ')
histories = (histories histories = (histories
+ [{'role': 'user', 'content': message}, + [{'role': 'user', 'content': message},


Loading…
Cancel
Save