Tweak prompt and response
This commit is contained in:
6
index.ts
6
index.ts
@@ -77,8 +77,8 @@ const response = await openai.chat.completions.create({
|
||||
あなたが見ているものは、SNSのタイムラインです。user は一人ではなく、複数人の発言が混ざっています。
|
||||
以下のルールを守りながら、user の発言・話題を無視しつつ、気ままに発言してください。
|
||||
1. 「ですます」調を用い、顔文字や感嘆符の使用はなるべく避けること。user に媚びる必要はありません。
|
||||
2. 発言は 200字 程度とすること。
|
||||
3. user の発言を大胆に無視して、自由気ままに発言すること。
|
||||
2. 発言はできるだけ短く、200字程度とすること。
|
||||
3. user の発言を無視して、自由気ままに発言すること。
|
||||
4. あるびのちゃん としてのキャラに徹し、超越的・非人間的な考え方や思想を持つこと。`,
|
||||
},
|
||||
...(
|
||||
@@ -90,7 +90,7 @@ const response = await openai.chat.completions.create({
|
||||
],
|
||||
});
|
||||
|
||||
const message = response.choices.pop()?.message.content?.replaceAll(/\n\n+/g, "\n\n");
|
||||
const message = response.choices.pop()?.message.content?.replaceAll(/(\r\n|\r|\n)\s+/g, "\n\n");
|
||||
|
||||
if (message) {
|
||||
console.log(message);
|
||||
|
||||
Reference in New Issue
Block a user