fix(platform): 汇总知识库问答与图表展示修复

This commit is contained in:
HTEWJ\26070045 committed 2026-08-06 17:28:08 +08:00
1 parent f615e56bb9
commit 59ff2dd9c7
41 files changed
+4579 -766

No files matched your search

+10
View File
@@ -78,6 +78,16 @@ def test_friendly_workflow_failure_message_rewrites_tool_error_with_current_agen
assert message == '员工培训查询工具调用失败,请稍后重试;如持续失败请联系管理员。'
def test_friendly_upstream_error_message_identifies_rerank_authorization_failure():
"""断言:Dify 重排插件 403 应提示修复模型授权,而非误导为网络超时。"""
message = DifyService._friendly_upstream_error_message(
400,
'PluginInvokeError: 403 Forbidden for url https://api.example/v1/rerank',
agent_name='通用入口',
)
assert message == '通用入口的知识检索重排服务授权失败。请联系管理员在 Dify 中更新 Rerank 模型供应商的 API Key 后重新发布应用。'
def test_persist_stream_chat_record_uses_workflow_finished_tokens(app):
"""workflow_finished 首次落库应写入 data.total_tokens。"""
with app.app_context():