mirror of
https://github.com/kou029w/daraz-llm.git
synced 2025-01-18 08:05:12 +00:00
メンション以外では反応しないように
This commit is contained in:
parent
aa2850a776
commit
aefc225aca
1 changed files with 3 additions and 3 deletions
6
main.ts
6
main.ts
|
@ -27,7 +27,7 @@ const usage = `\
|
||||||
https://dash.deno.com/playground/darazllm
|
https://dash.deno.com/playground/darazllm
|
||||||
|
|
||||||
使い方:
|
使い方:
|
||||||
@darazllm <prompt> (または1/${n}の確率で)応答
|
@darazllm <prompt> 応答
|
||||||
@darazllm /bye すべて忘れる
|
@darazllm /bye すべて忘れる
|
||||||
@darazllm /help このテキストを表示
|
@darazllm /help このテキストを表示
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ async function visionChat(
|
||||||
{
|
{
|
||||||
role: "user",
|
role: "user",
|
||||||
content: content.map((c) =>
|
content: content.map((c) =>
|
||||||
c.type === "text" ? { ...c, text: `${system}\n\n${c.text}` } : c
|
c.type === "text" ? { ...c, text: `${system}\n\n${c.text}` } : c,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -112,7 +112,7 @@ app.message(async (c) => {
|
||||||
|
|
||||||
if (prompt) messages.push({ role: "user", content: prompt });
|
if (prompt) messages.push({ role: "user", content: prompt });
|
||||||
|
|
||||||
if (isMention || Math.floor(Math.random() * n) === 0) {
|
if (isMention) {
|
||||||
const content: Array<Groq.Chat.ChatCompletionContentPart> = prompt
|
const content: Array<Groq.Chat.ChatCompletionContentPart> = prompt
|
||||||
.split(separatorRegex)
|
.split(separatorRegex)
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
|
|
Loading…
Add table
Reference in a new issue