mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 20:55:51 +00:00
### 新功能 - Function Call 填表开关下方新增公益站风险提示横幅:部分公益站会屏蔽 tools 参数,请确认支持情况避免被意外封禁 ### 修复 - **Function Call 填表**: - 修复 ST 代理以 HTTP 200 + error body 形式返回错误、导致降级重试机制从未触发的问题 - 修复思考模式模型(如 DeepSeek v4-flash)因 tool_choice 不兼容返回 Bad Request 后正确降级并重试 - 重试时自动追加强制调用指令,防止思考模型绕过工具直接输出文本造成无效二次开销 - **超级记忆 / 翰林院**: - 修复 `getRagSettings()` 读写顶层路径而非嵌套路径,导致打开超级记忆面板后向量化、归档等开关在重载时被全默认值覆盖的问题 - 修复自动归档失效问题 - 修复归档管理器在同一事件中被三次触发的回归问题 - 修复翰林院设置旧版迁移逻辑异常
100 lines
3.4 KiB
JavaScript
100 lines
3.4 KiB
JavaScript
|
||
'use strict';
|
||
|
||
export const defaultSettings = {
|
||
retrieval: {
|
||
enabled: false,
|
||
apiEndpoint: 'openai',
|
||
customApiUrl: 'https://api.siliconflow.cn/v1',
|
||
apiKey: '',
|
||
embeddingModel: 'text-embedding-3-small',
|
||
notify: true,
|
||
batchSize: 50,
|
||
independentChatMemoryEnabled: false,
|
||
},
|
||
advanced: {
|
||
chunkSize: 768,
|
||
overlap: 50,
|
||
matchThreshold: 0.5,
|
||
queryMessageCount: 2,
|
||
maxResults: 10,
|
||
},
|
||
injection_novel: {
|
||
template: '以下内容是翰林院向量化后注入的原著小说剧情,但可能顺序会有些错乱,已经对前后做出了标识,请自行判断顺序:\n\n{{novel_text}}\n\n【以上内容是小说的原著剧情,切莫以此作为剧情进展,只是作为剧情的关联】',
|
||
position: 1,
|
||
depth: 2,
|
||
depth_role: 0,
|
||
},
|
||
injection_chat: {
|
||
template: '以下内容是翰林院向量化后注入的聊天对话记录,但可能顺序会有些错乱,已经对前后做出了标识,请自行判断顺序:\n\n{{chat_text}}\n\n【以上内容是对话的楼层记录,切莫以此作为剧情进展,只是作为相关提示】',
|
||
position: 1,
|
||
depth: 2,
|
||
depth_role: 0,
|
||
},
|
||
injection_lorebook: {
|
||
template: '以下内容是翰林院向量化后注入的世界书的条目内容(可能内含对话记录的总结),顺序可能会有些错乱,但已经对前后做出了标识,请自行判断顺序:\n\n{{lorebook_text}}\n\n【以上内容是从世界书中向量化后的内容,切莫以此作为剧情进展,只是作为已发生过的事情提醒】',
|
||
position: 1,
|
||
depth: 2,
|
||
depth_role: 0,
|
||
},
|
||
injection_manual: {
|
||
template: '以下内容是翰林院向量化后用户手动注入的内容,可能顺序会有些错乱,但已经对前后做出了标识,请自行判断顺序:\n\n{{manual_text}}\n\n【以上内容为用户手动向量化注入的内容,切莫以此作为剧情进展,只是作为相关提示】',
|
||
position: 1,
|
||
depth: 2,
|
||
depth_role: 0,
|
||
},
|
||
condensation: {
|
||
enabled: true,
|
||
autoCondense: false,
|
||
preserveFloors: 10,
|
||
layerStart: 1,
|
||
layerEnd: 10,
|
||
messageTypes: { user: true, ai: true, hidden: false },
|
||
tagExtractionEnabled: false,
|
||
tags: '摘要',
|
||
exclusionRules: [],
|
||
},
|
||
archive: {
|
||
enabled: false,
|
||
threshold: 20,
|
||
batchSize: 10,
|
||
targetTable: '总结表'
|
||
},
|
||
relationshipGraph: {
|
||
enabled: false,
|
||
},
|
||
rerank: {
|
||
enabled: false,
|
||
apiMode: 'custom',
|
||
url: 'https://api.siliconflow.cn/v1',
|
||
apiKey: '',
|
||
model: 'Pro/BAAI/bge-reranker-v2-m3',
|
||
top_n: 5,
|
||
hybrid_alpha: 0.7,
|
||
notify: true,
|
||
superSortEnabled: false,
|
||
priorityRetrieval: {
|
||
enabled: false,
|
||
sources: {
|
||
novel: {
|
||
enabled: false,
|
||
count: 5
|
||
},
|
||
chat_history: {
|
||
enabled: false,
|
||
count: 5
|
||
},
|
||
lorebook: {
|
||
enabled: false,
|
||
count: 5
|
||
},
|
||
manual: {
|
||
enabled: false,
|
||
count: 5
|
||
}
|
||
}
|
||
},
|
||
},
|
||
knowledgeBases: {},
|
||
};
|