|
@@ -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}, |
|
|