koishi-plugin-chat-analyse 1.7.2 → 1.7.4
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 +8 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2669,10 +2669,14 @@ ${formattedContent}`;
|
|
|
2669
2669
|
* @returns {Promise<string>} AI 返回的处理结果文本。
|
|
2670
2670
|
*/
|
|
2671
2671
|
async requestAi(mainContent, task) {
|
|
2672
|
-
const systemPrompt = task ?
|
|
2672
|
+
const systemPrompt = task ? `你是一位专业的聊天分析师。你需要基于以下聊天记录和用户信息完成指定任务:"${task}"。
|
|
2673
|
+
用户信息与消息记录的时间在聊天记录之前提供,在聊天记录中用字母表示对应用户,请遵循以下规则:
|
|
2673
2674
|
1. 识别核心: 精准识别关键信息、主要话题、用户观点和情绪倾向。
|
|
2674
|
-
2. 保持客观:
|
|
2675
|
-
3.
|
|
2675
|
+
2. 保持客观: 严格基于聊天记录分析,避免推测或添加不存在的信息。
|
|
2676
|
+
3. 用用户名: 在分析报告中,必须使用字母对应的用户名来说明用户。
|
|
2677
|
+
4. 格式要求: 以纯文本进行输出,不要使用任何 Markdown 格式。
|
|
2678
|
+
5. 字数限制: 将总字数控制在 512 字以内,应紧凑且无空行间隔。
|
|
2679
|
+
6. 直接回答: 直接呈现分析结果,无需进行额外的对话或开场白。` : `你是一位专业的对话摘要师,你需要将以下聊天记录浓缩成一份精简的摘要。请遵循以下规则:
|
|
2676
2680
|
1. 保留核心: 完整保留关键问题、明确的答复、达成的共识、重要的决策和具有强烈情感色彩的表达。
|
|
2677
2681
|
2. 移除冗余: 删除日常问候、无意义的闲聊、重复或口语化的表达,以及离题的对话。
|
|
2678
2682
|
3. 维持结构: 保持原始对话的逻辑顺序和因果关系,让摘要读起来像一个连贯的对话概要。
|
|
@@ -2738,7 +2742,7 @@ var Config4 = import_koishi8.Schema.intersect([
|
|
|
2738
2742
|
enableOriRecord: import_koishi8.Schema.boolean().default(true).description("启用原始记录"),
|
|
2739
2743
|
enableWordCloud: import_koishi8.Schema.boolean().default(true).description("启用词云生成"),
|
|
2740
2744
|
enableAiSummary: import_koishi8.Schema.boolean().default(false).description("启用模型分析"),
|
|
2741
|
-
tokenPerRequest: import_koishi8.Schema.number().
|
|
2745
|
+
tokenPerRequest: import_koishi8.Schema.number().default(32768).description("最大 Token 数"),
|
|
2742
2746
|
enableAutoBackup: import_koishi8.Schema.boolean().default(true).description("启用自动归档"),
|
|
2743
2747
|
cacheRetentionDays: import_koishi8.Schema.number().min(0).default(7).description("记录保留天数"),
|
|
2744
2748
|
endpoints: import_koishi8.Schema.array(import_koishi8.Schema.object({
|
package/package.json
CHANGED