|
@@ -60,7 +60,7 @@ class Main: |
|
|
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 = chat_item.message |
|
|
answer: str = Talk.main (message, chat_item.author.name) |
|
|
|
|
|
|
|
|
answer: str = Talk.main (message, chat_item.author['name']) |
|
|
|
|
|
|
|
|
with open ('log.txt', 'a') as f: |
|
|
with open ('log.txt', 'a') as f: |
|
|
f.write (f'{datetime.now ()}\t{json.dumps (chat_item.__dict__)}\t{answer}\n') |
|
|
f.write (f'{datetime.now ()}\t{json.dumps (chat_item.__dict__)}\t{answer}\n') |
|
|