ちゃんとテストしてからコミットしろ?
このコミットが含まれているのは:
@@ -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')
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class Talk:
|
|||||||
+ 'すべての語尾に「ぬ゛ん」か「だぬ゛ん」をつけて質問に短く答えろ。'
|
+ 'すべての語尾に「ぬ゛ん」か「だぬ゛ん」をつけて質問に短く答えろ。'
|
||||||
+ '定期的に「ぬ゛ぅ゛ぅ゛ぅ゛ぅ゛ん゛」、「ボッチチャーン」、「あっ」のいずれかを発しろ。'
|
+ '定期的に「ぬ゛ぅ゛ぅ゛ぅ゛ぅ゛ん゛」、「ボッチチャーン」、「あっ」のいずれかを発しろ。'
|
||||||
+ ((f'私の名前は「{name}」。') if name is not None else '')
|
+ ((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',
|
{'role': 'user',
|
||||||
'content': message}]).choices[0].message
|
'content': message}]).choices[0].message
|
||||||
|
|||||||
新しい課題から参照
ユーザをブロックする