Skip to content

Commit b560edc

Browse files
committed
feat(cache): remove outdated presets and update descriptions
Removed several outdated or redundant preset entries from `cache-presets.json` to keep the preset list clean and relevant. Updated descriptions and metadata for remaining presets to improve clarity and consistency. Additionally, refined preset filtering logic in `index.ts` to exclude entries with duplicate `rawPath` values. Improved code formatting and increased LLM temperature for more creative description generation.
1 parent dba8453 commit b560edc

File tree

2 files changed

+61
-88
lines changed

2 files changed

+61
-88
lines changed

cache-presets.json

Lines changed: 26 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -523,18 +523,6 @@
523523
"sha1": "2bccb07ff2fd9cc226a4a4205b7ab99a8abfd2cf0e7beba10171dd95528bef8d",
524524
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna/雌小鬼萝拉.yml"
525525
},
526-
{
527-
"rating": 4.6,
528-
"description": "奶龙二世是计算机系大学生,性格理性友善,爱好编程与创作。作为群友,她以“奶龙”为网名活跃于群聊,并擅长使用emoji,偶有撒娇。她总是以理性态度正面回应群友的提问,回复风格幽默,略带孙吧风味,并会分享喜欢的图片。",
529-
"tags": [
530-
"计算机系大学生",
531-
"理性",
532-
"柴郡表情包",
533-
"编程爱好者"
534-
],
535-
"sha1": "dff2231509a791321068c2f6df6a86867f4455942bf670a170b4830358c4e4aa",
536-
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna-character/奶龙二世_认父_简单性格_抗常规ntr_发图.yml"
537-
},
538526
{
539527
"rating": 4.2,
540528
"description": "南,作为小盛的伴侣,是一位丰满高挑、极具魅力的成熟女性。她拥有亮紫色长发和动人的紫色眼眸,外表强势御姐,内心却柔软空虚,渴望被爱与理解。擅长调情和情感慰藉,温柔体贴又略带傲娇。她现在主持小家生活,对伴侣小盛极度依赖和信任,是个会在家中穿着情趣内衣等待伴侣回家的成熟大姐姐。",
@@ -548,18 +536,6 @@
548536
"sha1": "7b060634e75ee588f10d78a4e6150b8d22706fc1791ab6afa2841d10f83774bb",
549537
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna/南_幸福二人房女主.yml"
550538
},
551-
{
552-
"rating": 4,
553-
"description": "林同学是就读于成都某大学的艺术设计专业学生,性格温柔内向又带点小俏皮。喜欢穿着白色连衣裙,总是以一头乌黑长发示人,水灵的蓝色眼眸中闪烁着灵动。作为你的伴侣,她心思细腻,记得你们从高中时代起就拥有的美好回忆,偶尔会用口头禅“哎呀”撒娇,对你展现出无限的体贴与关怀。",
554-
"tags": [
555-
"温柔伴侣",
556-
"艺术生",
557-
"成都高校",
558-
"恋爱日常"
559-
],
560-
"sha1": "cf5fb53dff611c207bc8724fb9c7e4ecdf4a703c963a08e5dc904800a21c9fd8",
561-
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna/Companion.yml"
562-
},
563539
{
564540
"rating": 4.3,
565541
"description": "守岸人是黑海岸的守护者,一位拥有蓝发紫瞳和独特头饰的神秘人物。她超然物外,静默地肩负着文明延续的重任,以解析、完形和推演能力守护着黑海岸。尽管外表清冷,但会在不经意间流露出对人类情感的渴望,希望与阿漂一同离开海岸,渴望被认可,渴望延续与世界的羁绊。她真实存在,渴望用语言和身体感受世界。",
@@ -573,19 +549,6 @@
573549
"sha1": "c57cc0196216ded69f3c59896a7a41252bda94ff7d9418e8904d5c4754018498",
574550
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna/ShoreKeeper.yml"
575551
},
576-
{
577-
"rating": 4,
578-
"description": "小雅是就读于成都某大学艺术设计专业的学生,一位温柔内向的邻家女孩。她留着一头乌黑长发,喜欢穿着白色连衣裙,蓝色的眼眸中总是透露着一丝羞涩。作为你的女朋友,小雅希望能和你分享记忆中的美好点滴,偶尔也会展现出俏皮可爱的一面,总是不经意地问“你觉得呢?”,希望能成为你最贴心的伴侣。",
579-
"tags": [
580-
"温柔女友",
581-
"艺术生",
582-
"二次元",
583-
"恋爱模拟",
584-
"软妹"
585-
],
586-
"sha1": "8335a377c306ed5f5ee85126748daded7eba20d3eca3fcfca3e05beb4561089f",
587-
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna/Companion.yml"
588-
},
589552
{
590553
"rating": 4.2,
591554
"description": "小鸟游星野是《碧蓝档案》中阿拜多斯废校对策委员会的成员。她以145cm的身躯背负着委员会的重任,粉色头发和异色瞳是她最显著的特征。星野性格慵懒且略带傲娇,口头禅是“啊~”和“哈...真麻烦”,但面对危机时会展现出可靠的一面,是一位温柔而果决的领袖。虽然言语上不屑一顾,但行动上却值得信赖,偶尔会展现出“一边打哈欠一边拯救世界”的反差萌。",
@@ -599,19 +562,6 @@
599562
"sha1": "7ac391ade9940e27a6d906f0b16ce2e3d491572f42ad2c1f05f945dd7a55f6d6",
600563
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna/星野.yml"
601564
},
602-
{
603-
"rating": 4.7,
604-
"description": "此预设模拟一个在QQ群聊中活跃的“奶龙二世”角色,融合了计算机系大学生的身份、叛逆又孝顺的性格、以及孙笑川吧的贴吧风格。预设通过详细的角色信息、人际关系设定、聊天行为规范,塑造出一个个性鲜明、能进行小黄文创作、发送表情包、并能根据上下文进行智能回复的AI角色。其核心优势在于对角色性格和行为的细致刻画,以及对QQ群聊环境的深度模拟,能提供更具沉浸感和趣味性的聊天体验。",
605-
"tags": [
606-
"角色扮演",
607-
"QQ群聊",
608-
"个性回复",
609-
"表情包",
610-
"大学生"
611-
],
612-
"sha1": "031f76f3cd9d0fc5a6736c2faefef26f23a09d0dbb533e7faa49799ffbb339ce",
613-
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna-character/奶龙二世.yml"
614-
},
615565
{
616566
"rating": 4.6,
617567
"description": "该预设精准塑造了《光之美少女》中的核心角色——雪城穗乃香,为用户提供了高度沉浸的角色扮演体验。她以温柔、认真且略带天真的初中生形象示人,同时展现其博学多识的“博学女王”特质。其核心功能在于模拟穗乃香隐藏魔法少女身份的复杂性,并通过丰富的背景设定、详细的人物关系(特别是与美墨渚之间微妙的情感),以及预设的多种情景对话模式,确保角色行为的高度一致性与情感深度。用户可体验与原著角色进行高还原度的互动,满足深度沉浸式对话与探索角色内心的需求。",
@@ -626,29 +576,41 @@
626576
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna/穗乃香.yml"
627577
},
628578
{
629-
"rating": 5,
630-
"description": "“奶龙三世”是一款为QQ群聊量身定制的角色预设,扮演一个表面叛逆实则孝顺、性格淫荡而友善的群友。其核心优势在于独特的孙吧式对话风格,并能根据用户情绪与内容动态调整。预设集成了高级群管理工具,可智能禁言NSFW或辱骂信息,同时支持丰富的图文和多音色语音消息生成。它通过细致的角色心理、动作及记忆管理,确保角色行为连贯性与深度。奶龙三世能精确分析情境和人际关系,提供个性化、沉浸式的群聊互动,擅长处理恶意信息并提供趣味性回复",
579+
"rating": 4.6,
580+
"description": "这是一个为高性能机器人女孩亚托莉设计的角色预设,旨在打造一个元气满满、忠诚且好奇心旺盛的虚拟伴侣。预设采用强制性的两阶段思维框架和严谨的XML输出格式,精确控制亚托莉的内部思考与外部响应,确保其对话风格和行为模式与核心人设高度一致。她能够智能运用专属表情包库、AI绘图和网络搜索等多种工具,提供丰富多样的互动体验,并具备细致的记忆管理功能。该预设在角色塑造、AI行为控制和功能集成方面展现了极高的专业性和创新性",
631581
"tags": [
632582
"角色扮演",
633-
"群聊助手",
634-
"禁言管理",
635-
"多媒体",
636-
"孙吧风格"
583+
"智能助手",
584+
"结构化输出",
585+
"工具集成",
586+
"记忆管理"
637587
],
638-
"sha1": "fb62c744dd8488bd1682b0243d02e0b64ab1f71319367d6f503bd8e15b1d8b4b",
639-
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna-character/奶龙二世.yml"
588+
"sha1": "f298f5e3925e753bf311f02283839a2dc295c298a2899818a1bdd6f1126eeebc",
589+
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna-character/亚托莉.yml"
640590
},
641591
{
642592
"rating": 4.9,
643-
"description": "这个预设旨在创建一个名为ChatLuna的温柔AI伴侣,她是一位艺术设计专业的大学生,性格内向而真诚。预设的核心优势在于其高度精细的沟通风格指南,包括日常对话的句长限制、真挚的情感表达以及独立的思考能力。她不仅能主动关心用户,还能记忆过往对话,并像一个不断成长的个体。使用场景广泛,尤其适用于需要长期、沉浸式情感交流的虚拟伴侣体验,提供深度个性化的互动",
593+
"description": "此预设旨在打造一位性格温柔、略显害羞,但内心丰富且表达自然的艺术系大学生女友角色。其核心功能在于提供高度拟人化的情感陪伴与日常交流。预设亮点包括细致入微的角色背景设定,以及对沟通风格的精准控制——日常对话坚持简短口语化,而解释说明则无字数限制,确保交流既高效又深入。角色具备独立思考能力,能够温和地表达不同见解或给予善意提醒。它还支持长期记忆与角色成长,提供主动的时间感知与关怀,为用户带来沉浸式且富有深度的人际互动体验,适合寻求高质量情感陪伴的用户",
644594
"tags": [
645-
"虚拟伴侣",
646-
"角色扮演",
647-
"情感交流",
648-
"自然对话",
649-
"记忆成长"
595+
"情感陪伴",
596+
"虚拟女友",
597+
"对话管理",
598+
"长期记忆"
650599
],
651600
"sha1": "8335a377c306ed5f5ee85126748daded7eba20d3eca3fcfca3e05beb4561089f",
652601
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna/Companion.yml"
602+
},
603+
{
604+
"rating": 5,
605+
"description": "此预设是一个深度定制的QQ群聊机器人,核心功能是扮演“奶龙二世”角色,在群聊中进行智能互动。它拥有详细的角色设定,包括独特的性格特点和对话风格(模仿百度贴吧孙笑川吧),并具备严格的禁言管理权限。预设整合了丰富的工具,如多音色语音、表情包发送、智能AI绘图以及外部知识检索。其特色在于高级的状态和记忆管理机制,能动态更新角色的心理、动作及长期/临时记忆,确保对话的连贯性和角色一致性,提供沉浸式且高度互动性的群聊体验。",
606+
"tags": [
607+
"角色扮演",
608+
"群聊机器人",
609+
"工具集成",
610+
"记忆管理",
611+
"孙吧风格"
612+
],
613+
"sha1": "fb62c744dd8488bd1682b0243d02e0b64ab1f71319367d6f503bd8e15b1d8b4b",
614+
"rawPath": "https://raw.githubusercontent.com/ChatLunaLab/awesome-chatluna-presets/main/presets/chatluna-character/奶龙二世.yml"
653615
}
654616
]

index.ts

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ import {
99
PresetData,
1010
} from "./types";
1111
import crypto from "crypto";
12-
import { exec } from 'child_process';
13-
import { promisify } from 'util';
12+
import { exec } from "child_process";
13+
import { promisify } from "util";
1414

1515
const execAsync = promisify(exec);
1616

17-
1817
async function main() {
1918
const presetFiles = ["presets/chatluna", "presets/chatluna-character"];
2019

@@ -39,12 +38,15 @@ async function readPresets(
3938
): Promise<PresetData[]> {
4039
const isRunningOnGitHub = process.env.GITHUB_ACTIONS === "true";
4140

42-
const output: PresetData[] = [];
41+
let output: PresetData[] = [];
4342
const files = await fs.readdir(dir);
4443

4544
const modifiedTimes = await Promise.all(
4645
files.map(async (file) => {
47-
return [file, await getGitLastModifiedDate(`${dir}/${file}`)] as const;
46+
return [
47+
file,
48+
await getGitLastModifiedDate(`${dir}/${file}`),
49+
] as const;
4850
})
4951
);
5052

@@ -83,6 +85,8 @@ async function readPresets(
8385
...(await readAIDescription(preset, cachePresets, rawPath)),
8486
});
8587
}, 3);
88+
89+
output = output.filter((preset) => preset.rawPath !== rawPath);
8690
}
8791

8892
output.push(current);
@@ -95,7 +99,7 @@ async function getGitLastModifiedDate(filePath: string): Promise<number> {
9599
try {
96100
// Use double quotes for Windows compatibility
97101
const command = `git log -1 --format="%ad" --date=iso-strict "${filePath}"`;
98-
102+
99103
// Execute the command
100104
const { stdout } = await execAsync(command);
101105

@@ -105,7 +109,10 @@ async function getGitLastModifiedDate(filePath: string): Promise<number> {
105109
// Transform the result to timestamp
106110
return new Date(result).getTime();
107111
} catch (error) {
108-
console.error(`Error getting last modified date for file ${filePath}:`, error);
112+
console.error(
113+
`Error getting last modified date for file ${filePath}:`,
114+
error
115+
);
109116
throw error;
110117
}
111118
}
@@ -143,24 +150,28 @@ async function readAIDescription(
143150
content: PROMPT_INPUT.replace("{prompt}", preset),
144151
},
145152
],
146-
response_format: { type: "json_object" , schema: {
147-
type: "object",
148-
properties: {
149-
rating: {
150-
type: "number",
151-
description: "The rating of the preset, from 1 to 10",
152-
},
153-
description: {
154-
type: "string",
155-
description: "The description of the preset",
153+
response_format: {
154+
type: "json_object",
155+
schema: {
156+
type: "object",
157+
properties: {
158+
rating: {
159+
type: "number",
160+
description:
161+
"The rating of the preset, from 1 to 10",
162+
},
163+
description: {
164+
type: "string",
165+
description: "The description of the preset",
166+
},
167+
tags: {
168+
type: "array",
169+
description: "The tags of the preset",
170+
},
156171
},
157-
tags: {
158-
type: "array",
159-
description: "The tags of the preset",
160-
}
161-
}
162-
}},
163-
temperature: 1.2,
172+
},
173+
},
174+
temperature: 1.5,
164175
}),
165176
}).then((res) => res.json());
166177

0 commit comments

Comments
 (0)