From d34d6e90fbcaae31640d5f1fa44f66176d917135 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Mon, 4 Dec 2023 23:42:05 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=A1=E3=82=83=E3=82=93=E3=81=A8=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=97=E3=81=A6=E3=81=8B=E3=82=89=E3=82=B3?= =?UTF-8?q?=E3=83=9F=E3=83=83=E3=83=88=E3=81=97=E3=82=8D=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 +- talk.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 6d97398..5642648 100644 --- a/main.py +++ b/main.py @@ -60,7 +60,7 @@ class Main: chat_item = random.choice (chat_items) chat_item.author = chat_item.author.__dict__ 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: f.write (f'{datetime.now ()}\t{json.dumps (chat_item.__dict__)}\t{answer}\n') diff --git a/talk.py b/talk.py index 7e78881..2cece2a 100644 --- a/talk.py +++ b/talk.py @@ -40,7 +40,7 @@ class Talk: + 'すべての語尾に「ぬ゛ん」か「だぬ゛ん」をつけて質問に短く答えろ。' + '定期的に「ぬ゛ぅ゛ぅ゛ぅ゛ぅ゛ん゛」、「ボッチチャーン」、「あっ」のいずれかを発しろ。' + ((f'私の名前は「{name}」。') if name is not None else '') - + f'現在日時{datetime.now ().strftime ("%Y/%m/%d %H:%M:%S")}'}, + + f'現在日時{datetime.now ().strftime ("%Y/%m/%d %H:%M:%S")}')}, {'role': 'user', 'content': message}]).choices[0].message