feat(agent): add per-agent citation output toggle
Move citation protocol injection to the system layer so custom prompts no longer own citation syntax. Agents can disable inline citations while source aliases still encode and decode tool arguments correctly.
This commit is contained in:
@@ -46,6 +46,7 @@ export interface CustomAgentConfig {
|
||||
temperature?: number;
|
||||
max_completion_tokens?: number; // 最大生成token数(普通模式)
|
||||
thinking?: boolean; // 是否启用思考模式(支持扩展思考的模型)
|
||||
citation_enabled?: boolean; // 是否在最终回答中输出知识库/网页来源引用(默认开启)
|
||||
|
||||
// ===== Agent模式设置 =====
|
||||
max_iterations?: number; // 最大迭代次数
|
||||
|
||||
@@ -1071,6 +1071,8 @@ export default {
|
||||
placeholderHint: "Type {'{{'} to trigger autocomplete",
|
||||
temperature: 'Temperature',
|
||||
thinking: 'Thinking Mode',
|
||||
citationEnabled: 'Show Source Citations',
|
||||
citationEnabledDesc: 'Show knowledge-base and web sources in final answers; retrieval and grounding still work when disabled',
|
||||
welcomeMessage: 'Welcome Message',
|
||||
welcomeMessagePlaceholder: 'Message displayed when this agent is selected',
|
||||
suggestedPrompts: 'Suggested Prompts',
|
||||
|
||||
@@ -2158,6 +2158,8 @@ export default {
|
||||
placeholderHint: "{'{{'} 입력 시 자동완성",
|
||||
temperature: "온도",
|
||||
thinking: "사고 모델",
|
||||
citationEnabled: "출처 인용 표시",
|
||||
citationEnabledDesc: "최종 답변에 지식베이스와 웹 출처를 표시합니다. 꺼도 검색과 근거 활용은 계속 작동합니다.",
|
||||
welcomeMessage: "환영 메시지",
|
||||
welcomeMessagePlaceholder: "에이전트 선택 시 표시되는 환영 메시지",
|
||||
suggestedPrompts: "추천 질문",
|
||||
|
||||
@@ -890,6 +890,8 @@ export default {
|
||||
placeholderHint: "Type {'{{'} to trigger autocomplete",
|
||||
temperature: 'Temperature',
|
||||
thinking: 'Thinking Mode',
|
||||
citationEnabled: 'Показывать ссылки на источники',
|
||||
citationEnabledDesc: 'Показывать источники базы знаний и веб-страниц в итоговом ответе; поиск продолжает работать и при отключении',
|
||||
welcomeMessage: 'Welcome Message',
|
||||
welcomeMessagePlaceholder: 'Message displayed when this agent is selected',
|
||||
suggestedPrompts: 'Suggested Prompts',
|
||||
|
||||
@@ -2157,6 +2157,8 @@ export default {
|
||||
placeholderHint: "输入 {'{{'} 触发自动补全",
|
||||
temperature: "温度",
|
||||
thinking: "思考模式",
|
||||
citationEnabled: "输出来源引用",
|
||||
citationEnabledDesc: "在最终回答中展示知识库和网页来源;关闭后仍会正常检索和使用证据",
|
||||
welcomeMessage: "欢迎消息",
|
||||
welcomeMessagePlaceholder: "选择该智能体时显示的欢迎消息",
|
||||
suggestedPrompts: "推荐问题",
|
||||
|
||||
@@ -620,6 +620,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 来源引用 -->
|
||||
<div class="setting-row">
|
||||
<div class="setting-info">
|
||||
<label>{{ $t('agent.editor.citationEnabled') }}</label>
|
||||
<p class="desc">{{ $t('agent.editor.citationEnabledDesc') }}</p>
|
||||
</div>
|
||||
<div class="setting-control">
|
||||
<t-switch v-model="formData.config.citation_enabled" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ReRank 模型(启用知识库或 knowledge_search 工具时显示) -->
|
||||
<div
|
||||
v-if="showRerankModelField"
|
||||
@@ -2274,6 +2285,7 @@ const defaultFormData = {
|
||||
temperature: 0.7,
|
||||
max_completion_tokens: 2048,
|
||||
thinking: false, // 默认禁用思考模式
|
||||
citation_enabled: true, // 默认输出知识库/网页来源引用
|
||||
// Agent模式设置
|
||||
max_iterations: 10,
|
||||
llm_call_timeout: 120, // 120 seconds
|
||||
|
||||
Reference in New Issue
Block a user