koishi-plugin-memesluna 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +25 -25
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1728,10 +1728,10 @@ aliases: 字符串数组(辅助检索)
|
|
|
1728
1728
|
- 只返回合法 JSON,格式:{"aliases": [...], "tags": [...]}`;
|
|
1729
1729
|
var Config = import_koishi2.Schema.intersect([
|
|
1730
1730
|
import_koishi2.Schema.object({
|
|
1731
|
-
backendPath: import_koishi2.Schema.string().default("/memesluna").description("
|
|
1732
|
-
selfUrl: import_koishi2.Schema.string().default("").description("
|
|
1733
|
-
injectVariables: import_koishi2.Schema.boolean().default(true).description("
|
|
1734
|
-
variableRefreshIntervalMs: import_koishi2.Schema.number().min(30 * 1e3).max(60 * 60 * 1e3).default(5 * 60 * 1e3).description("
|
|
1731
|
+
backendPath: import_koishi2.Schema.string().default("/memesluna").description("插件 HTTP 路由的前缀路径,默认 /memesluna,修改后需重启"),
|
|
1732
|
+
selfUrl: import_koishi2.Schema.string().default("").description("插件对外暴露的完整地址(含协议和端口),留空则自动使用 Koishi server.selfUrl"),
|
|
1733
|
+
injectVariables: import_koishi2.Schema.boolean().default(true).description("开启后向 ChatLuna 注入 {{endpoint}} 路由列表和 {{memesluna}} 使用说明,让 AI 能发图"),
|
|
1734
|
+
variableRefreshIntervalMs: import_koishi2.Schema.number().min(30 * 1e3).max(60 * 60 * 1e3).default(5 * 60 * 1e3).description("ChatLuna 变量自动刷新间隔(毫秒),新增合集或路由后最多等待这么久才生效"),
|
|
1735
1735
|
injectVariablesPrompt: import_koishi2.Schema.string().role("textarea").default(`你可以使用表情包来丰富你的回复。可用的表情包合集如下:
|
|
1736
1736
|
|
|
1737
1737
|
{endpoint}
|
|
@@ -1747,25 +1747,25 @@ var Config = import_koishi2.Schema.intersect([
|
|
|
1747
1747
|
例如:
|
|
1748
1748
|
如果你想发送"开心"标签下的表情包,请在回复中包含类似{base_url}/memesluna/开心
|
|
1749
1749
|
如果你想发送"vrchat" 合集下的表情包,请在回复中包含类似{base_url}/memesluna/vrchat
|
|
1750
|
-
如果你想发送"lai" 端点的表情包,请在回复中包含类似{base_url}/memesluna/lai`).description("
|
|
1750
|
+
如果你想发送"lai" 端点的表情包,请在回复中包含类似{base_url}/memesluna/lai`).description("注入 ChatLuna 的提示词模板,支持占位符:{endpoint}(路由列表)、{base_url}(服务地址)、{tags}(所有可用标签)")
|
|
1751
1751
|
}).description("基础配置"),
|
|
1752
1752
|
import_koishi2.Schema.object({
|
|
1753
|
-
autoCollect: import_koishi2.Schema.boolean().default(false).description("
|
|
1754
|
-
whitelistGroups: import_koishi2.Schema.array(import_koishi2.Schema.string()).role("table").default([]).description("
|
|
1755
|
-
emojiFrequencyWindowMinutes: import_koishi2.Schema.number().min(1).max(1440).default(10).description("
|
|
1756
|
-
emojiFrequencyThreshold: import_koishi2.Schema.number().min(1).max(50).default(3).description("
|
|
1757
|
-
minEmojiSize: import_koishi2.Schema.number().min(1).max(1024).default(50).description("
|
|
1758
|
-
maxEmojiSize: import_koishi2.Schema.number().min(1).max(100).default(15).description("
|
|
1759
|
-
groupAutoCollectLimit: import_koishi2.Schema.number().min(1).max(5e3).default(300).description("
|
|
1753
|
+
autoCollect: import_koishi2.Schema.boolean().default(false).description("开启后自动监听群聊消息,高频出现的图片会自动进入暂缓区等待审核"),
|
|
1754
|
+
whitelistGroups: import_koishi2.Schema.array(import_koishi2.Schema.string()).role("table").default([]).description("自动暂存白名单群号,留空表示监听所有群;填写后只有这些群的图片会被统计"),
|
|
1755
|
+
emojiFrequencyWindowMinutes: import_koishi2.Schema.number().min(1).max(1440).default(10).description("高频统计的时间窗口(分钟),窗口内同一张图出现次数超过阈值才触发暂存"),
|
|
1756
|
+
emojiFrequencyThreshold: import_koishi2.Schema.number().min(1).max(50).default(3).description("同一张图在统计窗口内出现几次后放入暂缓区"),
|
|
1757
|
+
minEmojiSize: import_koishi2.Schema.number().min(1).max(1024).default(50).description("自动暂存的图片最小体积(KB),低于此大小的图片会被忽略"),
|
|
1758
|
+
maxEmojiSize: import_koishi2.Schema.number().min(1).max(100).default(15).description("自动暂存的图片最大体积(MB),超过此大小的图片会被忽略"),
|
|
1759
|
+
groupAutoCollectLimit: import_koishi2.Schema.number().min(1).max(5e3).default(300).description("每个群每天最多触发自动暂存的图片数量上限,防止刷屏导致暂缓区过大")
|
|
1760
1760
|
}).description("自动暂存配置"),
|
|
1761
1761
|
import_koishi2.Schema.object({
|
|
1762
|
-
similarityThreshold: import_koishi2.Schema.number().min(0.5).max(1).step(0.01).role("slider").default(0.9).description("
|
|
1763
|
-
stagingRetentionDays: import_koishi2.Schema.number().min(0).max(365).default(0).description("
|
|
1764
|
-
}).description("
|
|
1762
|
+
similarityThreshold: import_koishi2.Schema.number().min(0.5).max(1).step(0.01).role("slider").default(0.9).description("暂缓区相似图片聚合阈值(0~1),越高越严格,仅用于管理界面分组展示,不会自动删除"),
|
|
1763
|
+
stagingRetentionDays: import_koishi2.Schema.number().min(0).max(365).default(0).description("暂缓区图片自动过期天数,0 表示永久保留不自动清理")
|
|
1764
|
+
}).description("暂缓区配置"),
|
|
1765
1765
|
import_koishi2.Schema.object({
|
|
1766
|
-
model: import_koishi2.Schema.dynamic("model").description("
|
|
1767
|
-
autoAnnotate: import_koishi2.Schema.boolean().default(false).description("
|
|
1768
|
-
annotatePrompt: import_koishi2.Schema.string().role("textarea").default(DEFAULT_ANNOTATE_PROMPT).description("AI
|
|
1766
|
+
model: import_koishi2.Schema.dynamic("model").description("AI 标注使用的模型,需已在 ChatLuna 中配置"),
|
|
1767
|
+
autoAnnotate: import_koishi2.Schema.boolean().default(false).description("上传图片时自动触发 AI 语义标注(生成 tags 和 aliases),需先配置模型"),
|
|
1768
|
+
annotatePrompt: import_koishi2.Schema.string().role("textarea").default(DEFAULT_ANNOTATE_PROMPT).description("AI 标注的 System 提示词,要求模型输出 { aliases: string[], tags: string[] } 格式 JSON"),
|
|
1769
1769
|
synonymGroups: import_koishi2.Schema.array(import_koishi2.Schema.string()).role("table").default([
|
|
1770
1770
|
"幸福,开心,高兴,快乐,治愈,满足",
|
|
1771
1771
|
"委屈,难过,伤心,沮丧,流泪,大哭",
|
|
@@ -1782,11 +1782,11 @@ var Config = import_koishi2.Schema.intersect([
|
|
|
1782
1782
|
"摆烂,咸鱼,躺平,不想动,无所谓,累了,疲惫",
|
|
1783
1783
|
"害怕,发抖,瑟瑟发抖,惊恐,怂,慌张",
|
|
1784
1784
|
"求求,拜托,求你,拜托了"
|
|
1785
|
-
]).description("
|
|
1786
|
-
aiConcurrency: import_koishi2.Schema.number().min(1).max(10).default(2).description("AI
|
|
1787
|
-
aiBatchDelay: import_koishi2.Schema.number().min(0).max(5e3).default(500).description("
|
|
1788
|
-
aiMaxAttempts: import_koishi2.Schema.number().min(1).max(10).default(3).description("AI
|
|
1789
|
-
aiBackoffBase: import_koishi2.Schema.number().min(100).max(1e4).default(1e3).description("
|
|
1785
|
+
]).description("同义词分组,每行一组,组内用逗号(, 或 ,)分隔;同组词会被合并为同一标签,也用于标签路由的跨词匹配"),
|
|
1786
|
+
aiConcurrency: import_koishi2.Schema.number().min(1).max(10).default(2).description("AI 标注的并发请求数,越大速度越快但对模型负载更高"),
|
|
1787
|
+
aiBatchDelay: import_koishi2.Schema.number().min(0).max(5e3).default(500).description("批量标注时每张图之间的等待时间(毫秒),用于避免触发模型限流"),
|
|
1788
|
+
aiMaxAttempts: import_koishi2.Schema.number().min(1).max(10).default(3).description("AI 标注失败后的最大重试次数"),
|
|
1789
|
+
aiBackoffBase: import_koishi2.Schema.number().min(100).max(1e4).default(1e3).description("重试退避基数(毫秒),每次重试等待时间 = 基数 × 重试次数")
|
|
1790
1790
|
}).description("AI 标注配置")
|
|
1791
1791
|
]);
|
|
1792
1792
|
var name = "memesluna";
|
|
@@ -3140,8 +3140,8 @@ function apply(ctx, config) {
|
|
|
3140
3140
|
}
|
|
3141
3141
|
__name(apply, "apply");
|
|
3142
3142
|
var inject = {
|
|
3143
|
-
required: ["database"],
|
|
3144
|
-
optional: ["memesluna", "
|
|
3143
|
+
required: ["database", "chatluna", "server"],
|
|
3144
|
+
optional: ["memesluna", "console"]
|
|
3145
3145
|
};
|
|
3146
3146
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3147
3147
|
0 && (module.exports = {
|
package/package.json
CHANGED