ちゃんとテストしてからコミットしろ?

このコミットが含まれているのは:
2023-12-04 23:42:05 +09:00
コミット d34d6e90fb
2個のファイルの変更2行の追加2行の削除
+1 -1
ファイルの表示
@@ -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')
+1 -1
ファイルの表示
@@ -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