Merge #20 into develop_web from feature/20251219_zy

feat(web): remove mock data

* feature/20251219_zy: (5 commits)
  feat(web): update api key
  feat(web): Add Emotion Memory
  feat(web): Add  Reflection Engine
  feat(web): Add  Reflection Engine API
  feat(web): remove mock data

Signed-off-by: zhaoying <zhaoying@redbearai.com>
Merged-by: zhaoying <zhaoying@redbearai.com>

CR-link: https://codeup.aliyun.com/redbearai/python/redbear-mem-open/change/20
This commit is contained in:
赵莹
2025-12-19 18:55:33 +08:00
23 changed files with 2168 additions and 155 deletions

View File

@@ -35,6 +35,9 @@ export const zh = {
knowledgeDocumentDetails: '详情',
userMemoryDetail: '用户记忆详情',
toolManagement: '工具管理',
emotionEngine: '情感引擎',
emotionDetail: '情绪记忆',
selfReflectionEngine: '反思引擎',
},
knowledgeBase: {
home: '首页',
@@ -180,7 +183,6 @@ export const zh = {
fileName: '文件名称',
fileList: '文件列表',
blockPreview: '分块预览',
processingDocuments: '正在处理文档,请稍候...',
chunkContent: '分块内容',
sampleChunk: '示例分块内容',
noFilesSelected: '暂无文件',
@@ -190,10 +192,6 @@ export const zh = {
waiting: '等待中',
startUpload: '共{{count}}个文件 | 开始上传',
startUploading: '开始上传',
startUploadConfirmTitle: '开始处理文档',
startUploadConfirmContent: '文档处理将在后台进行,您可以选择立即返回列表页或停留在此页面查看处理进度。',
returnToList: '返回列表页',
stayOnPage: '停留在此页',
uploadSuccess: '上传成功',
datasetName: '数据集名称',
pleaseEnterDatasetName: '请输入数据集名称',
@@ -759,8 +757,8 @@ export const zh = {
copy: '复制',
copySuccess: '复制成功',
viewDetails: '查看详情',
enabled: '启用',
disabled: '停用',
enabled: '启用',
disabled: '停用',
updateWarning: '更新警告',
deleteWarning: '删除警告',
deleteWarningContent: '确定要删除此{{content}}吗?',
@@ -800,9 +798,7 @@ export const zh = {
logoutApiCannotRefreshToken: '退出登录接口不能刷新token',
publicApiCannotRefreshToken: '公共接口不能刷新token',
refreshTokenNotExist: '刷新token不存在',
reset: '重置',
statusEnabled: '已启用',
statusDisabled: '已禁用',
reset: '重置'
},
product: {
applicationManagement: '应用管理',
@@ -1007,6 +1003,8 @@ export const zh = {
active: '活跃',
inactive: '不活跃',
configurationName: '配置名称',
emotionEngine: '情感引擎',
reflectionEngine: '反思引擎'
},
member: {
username: '用户名',
@@ -1067,8 +1065,8 @@ export const zh = {
minimumRetentionDesc: '控制记忆随时间的遗忘速度,值越高时间越短',
forgettingRate: '记忆遗忘率 (λ_mem)',
forgettingRateDesc: '控制记忆遗忘的速度,值越高遗忘越快',
offset: '最小保留度 (offset)',
offsetDesc: '控制记忆保留的最小保留阈值 遗忘这地方改个文字描述',
offset: '偏移量 (offset)',
offsetDesc: '最小保留度的偏移量',
CurrentValue: '当前值',
range: '范围',
forgettingEngineConfigParams: '遗忘引擎配置参数',
@@ -1124,11 +1122,8 @@ export const zh = {
storageType: '存储类型',
rag: 'RAG存储',
ragDesc: '基于向量检索,适合文档问答和语义搜索',
neo4j: '图存储',
neo4j: '图存储',
neo4jDesc: '基于知识图谱,适合关系推理和路径查询',
llmModel: 'LLM 模型',
embeddingModel: 'Embedding 模型',
rerankModel: 'Rerank 模型'
},
memoryExtractionEngine: {
title: '记忆引擎模块配置中心',
@@ -1203,7 +1198,7 @@ export const zh = {
intelligentSemanticPruningSceneDesc: '选择智能语义修剪场景education、online_service、outbound。',
intelligentSemanticPruningThreshold: '智能语义修剪阈值',
intelligentSemanticPruningThresholdDesc: '设置智能语义修剪阈值0-0.9)。',
selfReflexionEngine: '自我反思引擎',
reflectionEngine: '自我反思引擎',
selfReflexionEngineSubTitle: '通过反思和精炼,将情节记忆转化为更深层的语义记忆。',
enableSelfReflexion: '启用自我反思',
iterationPeriod: '迭代周期',
@@ -1299,8 +1294,6 @@ export const zh = {
startANewConversation: '开始新对话',
normalReply: '正常回复',
quickReply: '快速回复',
memoryConversationAnalysisEmpty: '当前没有可用的对话分析内容',
memoryConversationAnalysisEmptySubTitle: '输入用户ID后单击“发送”查看对话记忆'
},
login: {
title: '红熊记忆科学',
@@ -1371,24 +1364,6 @@ export const zh = {
websocketDemoCard: 'WebSocket 演示',
sseDemoCard: 'SSE演示'
},
workflow: {
title: '工作流编辑器',
description: '拖拽节点创建连接,构建您的工作流程。点击节点可进行配置。',
addNode: '添加节点',
deleteNode: '删除选中',
saveWorkflow: '保存工作流',
startNode: '触发节点',
conditionNode: '条件判断',
actionNode: '执行动作',
endNode: '结束节点',
newNode: '新节点',
node: '节点',
nodesCreated: '已创建节点',
loadingNodes: '正在加载节点 {{progress}}%',
loadingFailed: '加载节点失败',
create5kNodes: '创建5000节点',
create10kNodes: '创建10000节点'
},
notFound: {
title: '页面未找到',
description: '请求的页面不存在。',
@@ -1419,5 +1394,391 @@ export const zh = {
active: '活跃',
inactive: '过期'
},
tool: {
mcp: 'MCP 服务',
inner: '内置工具',
custom: '自定义工具',
mcpSearchPlaceholder: '搜索MCP服务...',
addService: '添加MCP服务',
addServiceSuccess: '服务添加成功',
serviceAddress: '服务地址',
lastConnection: '最后连接',
responseTime: '响应时间',
status: {
running: '运行中',
stopped: '已停止',
abnormal: '异常',
unknown: '未知'
},
serviceEndpoint: '服务端点 URL',
serviceEndpointPlaceholder: '服务端点的 URL',
serviceEndpointExtra: 'MCP服务的完整访问地址',
nameAndIcon: '名称和图标',
namePlaceholder: '命名你的 MCP 服务',
serverIdentifier: '服务器标识符',
serverIdentifierPlaceholder: '服务器唯一标识,例如 my-mcp-server',
serverIdentifierLength: '最多 24 个字符',
serverIdentifierPattern: '支持小写字母、数字、下划线和连字符',
description: '描述信息',
auth: '认证',
requestHeader: '请求头',
config: '配置',
authType: '认证方式',
noAuth: '无需认证',
apiKey: 'API Key',
basicAuth: 'Basic Auth',
bearerToken: 'Bearer Token',
username: '用户名',
password: '密码',
requestHeaderDesc: '发送到 MCP 服务器的额外 HTTP 请求头',
addRequestHeader: '添加请求头',
editRequestHeader: '编辑请求头',
requestHeaderName: '请求头名称',
requestHeaderValue: '请求头值',
timeout: '超时时间(秒)',
sseReadTimeout: 'SSE 读取超时时间(秒)',
saveAndTest: '保存并测试',
innerSearchPlaceholder: '搜索内置工具',
timeFormat: '时间格式化',
timeZoneConversion: '时区转换',
timestampConversion: '时间戳转换',
timeCalculation: '时间计算',
time_desc: '日期时间处理',
time_features: '提供时间格式转换、时区转换、时间戳计算等功能',
currentTime: '当前时间',
timestamp: '时间戳',
localTime: '本地时间',
utcTime: 'UTC时间',
secondsTimestamp: '时间戳(秒)',
millisecondsTimestamp: '时间戳(毫秒)',
enterTimestamp: '输入时间戳',
conversion: '转换',
conversionResult: '转换结果',
chooseFormatType: '选择格式',
json_desc: '数据格式转换',
json_features: 'JSON格式化、压缩、验证和转换功能',
jsonFormat: 'JSON格式化',
jsonGzip: 'JSON压缩',
jsonCheck: 'JSON验证',
jsonConversion: '格式转换',
jsonEg: '示例JSON',
enterJson: '输入JSON',
jsonPlaceholder: '输入JSON数据例如{"name": "测试", "value": 123}',
clear: '清空',
parse: '粘贴',
format: '格式化',
gzip: '压缩',
check: '验证',
escape: '转义',
outputResult: '输出结果',
validJosn: 'JSON格式正确验证通过',
baidu_desc: '搜索引擎服务',
baidu_features: '集成百度搜索API提供网页搜索、新闻搜索等功能',
webSearch: '网页搜索',
newsSearch: '新闻搜索',
imageSearch: '图片搜索',
realTimeResults: '实时结果',
configStatus: '配置状态',
hasApiKey: 'API 已配置并启用',
needApiKey: '需要配置API Key',
minerU_desc: 'PDF解析工具',
minerU_features: '高精度PDF文档解析工具支持文字、表格、图片提取',
pdfParser: 'PDF解析',
tableExtraction: '表格提取',
imageRecognition: '图片识别',
textExtraction: '文本提取',
textIn_desc: 'OCR文字识别',
textIn_features: '智能OCR文字识别服务支持多语言、手写体识别',
universalOCR: '通用OCR',
handwritingRecognition: '手写识别',
multilingualSupport: '多语言支持',
highPrecisionRecognition: '高精度识别',
configDesc: '配置说明',
baidu_config_desc: '使用百度搜索API需要先在百度开放平台申请API Key和Secret Key。',
minerU_config_desc: 'MinerU是高精度PDF文档解析工具需要API Key才能使用。',
textIn_config_desc: 'TextIn提供智能OCR文字识别服务支持多语言识别。',
link: '申请地址',
api_key: 'API Key',
baidu_api_key_desc: '从百度开放平台获取的API Key',
minerU_api_key_desc: '从MinerU平台获取的API Key',
secret_key: 'Secret Key',
baidu_secret_key_desc: '从百度开放平台获取的Secret Key',
textIn_secret_key_desc: '从TextIn平台获取的Secret Key',
search_type: '搜索类型',
pagesize: '每页结果数',
pagesize_desc: '每次搜索返回的结果数量1-50',
baidu_enable: '启用百度搜索',
baidu_safe_enable: '启用安全搜索',
baidu_safe_enable_desc: '过滤不适宜内容',
api_address: 'API地址',
minerU_api_address_desc: '默认使用官方API地址如有私有部署可修改',
textIn_api_address_desc: '默认使用官方API地址',
parsing_mode: '解析模式',
auto_recognition: '自动识别',
pure_text_mode: '纯文本模式',
table_priority: '表格优先',
image_priority: '图片优先',
minerU_timeout_desc: 'PDF解析超时时间10-300秒',
minerU_enable: '启用MinerU',
minerU_extract_images_enable: '提取图片',
minerU_extract_images_enable_desc: '是否提取PDF中的图片内容',
app_id: 'APP ID',
textIn_app_id_desc: '从TextIn平台获取的App ID',
language_identification: '识别语言',
automatic_detection: '自动检测',
simplified_chinese: '简体中文',
traditional_chinese: '繁体中文',
english: '英文',
japanese: '日文',
korean_language: '韩文',
pattern_recognition: '识别模式',
universal_identification: '通用识别',
high_precision_identification: '高精度识别',
handwriting_recognition: '手写体识别',
formula_recognition: '公式识别',
textIn_enable: '启用TextIn',
return_text_position_enable: '返回文本位置信息',
return_text_position_enable_desc: '是否返回识别文字的坐标位置',
addCustom: '添加自定义工具',
editCustom: '编辑自定义工具',
schema: 'Schema',
schemaPlaceholder: '在此处输入您的 OpenAPI schema',
authentication: '鉴权方式',
tag: '标签',
created_at: '创建时间',
headerName: 'Header 名称',
null: '无',
tagDesc: '多个标签用逗号分隔',
availableTools: '可用工具',
name: '名称',
desc: '描述',
method: '方法',
path: '路径',
viewDetail: '查看详情'
},
workflow: {
coreNode: '核心节点',
start: '开始Start',
end: '结束End',
answer: '回复Answer',
aiAndCognitiveProcessing: 'AI与认知处理',
llm: '大语言模型 (LLM)',
model_selection: '多模型选择',
model_voting: '多模型投票',
rag: '知识检索 (RAG)',
classification: '智能分类',
parameter_extraction: '参数提取',
flowControl: '流程控制',
condition: '条件分支',
iteration: '迭代 (Iteration)',
loop: '循环 (Loop)',
parallel: '并行执行',
aggregator: '聚合器',
externalInteraction: '外部交互',
http_request: 'HTTP请求',
tools: '工具 (Tools)',
code_execution: '代码执行',
template_rendering: '模板渲染',
cognitiveUpgrading: '认知升级(创新)',
task_planning: '任务规划',
reasoning_control: '推理控制',
self_reflection: '自我反思',
memory_enhancement: '记忆增强',
agentCollaborationNode: 'Agent 协作节点',
agent_scheduling: 'Agent 调度',
agent_collaboration: 'Agent 协同',
agent_arbitration: 'Agent 仲裁',
safetyAndCompliance: '安全与合规',
sensitive_detection: '敏感识别',
output_audit: '输出审计',
evolutionAndGovernance: '演化与治理',
self_optimization: '自我优化',
process_evolution: '流程演化',
clickToConfigure: '点击配置节点参数',
nodeProperties: '节点属性',
empty: "Emmm…盒子是空的这里什么都没有",
nodeName: '节点名称',
config: {
llm: {
model_id: '模型',
temperature: '温度',
max_tokens: '最大令牌数',
},
start: {
variables: '输入字段',
string: '文本',
number: '数字',
boolean: '复选框',
array: '下拉选项',
object: '对象',
addVariable: '添加变量',
editVariable: '编辑变量',
variableType: '变量类型',
variableName: '变量名称',
description: '显示名称',
default: '默认值',
required: '必填',
max_length: '最大长度',
defaultChecked: '选中',
notDefaultChecked: '不选中',
options: '选项',
},
end: {
output: '回复'
}
},
clear: '清空',
run: '运行',
save: '保存',
export: '导出',
variableConfig: '变量配置'
},
emotionEngine: {
emotionEngineConfig: '情感引擎配置',
emotion_enabled: '启用情感引擎',
emotion_enabled_desc: '自动分析对话中的情感倾向',
emotion_model_id: '情感分析模型',
emotion_model_id_desc: '不同模型在准确度和速度上有所差异',
emotion_extract_keywords: '情绪关键词提取',
emotion_extract_keywords_subTitle: '自动提取对话中的情绪相关关键词',
emotion_extract_keywords_desc: '提取如"开心"、"失望"、"期待"等情绪关键词,帮助更好地理解用户情绪',
emotion_min_intensity: '置信度阈值',
emotion_min_intensity_desc: '置信度越高,识别越准确,但可能遗漏部分信息',
emotion_enable_subject: '情绪主体分类 ',
emotion_enable_subject_subTitle: '识别情绪归属(自己/他人/物体)',
emotion_enable_subject_desc: '区分情绪主体: self (我感到开心)、other (他很生气)、object (这个产品很棒)',
currentValue: '当前值',
emotion_min_intensity_description: '置信度阈值说明',
question: '什么是置信度阈值?',
answer: '置信度阈值是情感引擎判断情绪时的"确定程度"标准。当 AI 分析出的情感置信度低于设定阈值时,该情感将不会被记录。',
differentTitle: '不同阈值的影响',
advantage: '优点',
shortcoming: '缺点',
scene: '适用场景',
low_title: '低阈值 (0.0 - 0.4)',
low_tag: '灵敏',
low_advantage: '能捕捉到更多细微的情感变化,不会遗漏潜在的情绪信号',
low_shortcoming: '可能产生误判,将中性或不明确的表达识别为特定情感',
low_scene: '需要全面了解用户情绪波动,对准确度要求不高的场景',
middle_title: '中阈值 (0.5 - 0.7)',
middle_tag: '推荐',
middle_advantage: '平衡准确度和覆盖率,既能识别明显情感,也不会过度敏感',
middle_shortcoming: '可能遗漏一些不太明显的情感表达',
middle_scene: '大多数日常对话场景,适合一般性情感分析需求',
high_title: '高阈值 (0.8 - 1.0)',
high_tag: '精准',
high_advantage: '只记录非常明确的情感表达,准确度极高,误判率低',
high_shortcoming: '会遗漏大量不够明显的情感信息,数据覆盖率低',
high_scene: '对准确度要求极高的场景,如情感危机预警、重要决策参考',
configSuggest: '配置建议',
first: '初次使用',
first_desc: '建议从中等阈值0.6-0.7)开始,观察一段时间后根据实际效果调整',
customer_service: '客服场景',
customer_service_desc: '建议使用较低阈值0.4-0.6),及时捕捉用户的不满情绪',
data_analysis: '数据分析',
data_analysis_desc: '建议使用中等阈值0.6-0.7),保证数据质量的同时有足够样本量',
risk_warning: '风险预警',
risk_warning_desc: '建议使用较高阈值0.7-0.8),确保预警的准确性',
actual_case: '实际案例',
user_input: '用户输入',
user_input_message: '"这个功能还行吧,不过有点小问题"',
neutral_emotion: '中性情感',
neutral_emotion_tag: '所有阈值都会记录',
minor_dissatisfaction: '轻微不满',
minor_dissatisfaction_tag: '仅低/中阈值会记录',
expect_improvement: '期待改进',
expect_improvement_tag: '仅低阈值会记录',
confidence: '置信度'
},
emotionDetail: {
wordCloud: '情感分布分析',
pieces: '条',
emotionTags: '高频情绪关键词',
joy: '喜悦',
anger: '愤怒',
sadness: '悲伤',
fear: '恐惧',
neutral: '中性',
surprise: '惊讶',
health: '情绪健康指数',
positivity_rate: '积极率',
stability: '稳定性',
resilience: '恢复力',
suggestions: '个性化建议',
},
reflectionEngine: {
reflectionEngineConfig: '反思引擎配置',
reflection_enabled: '启用反思引擎',
reflection_enabled_desc: '将情节记忆转化为语义记忆,形成长期认知',
reflection_model_id: '反思模型',
reflection_model_id_desc: '不同模型在准确度和速度上有所差异',
reflection_period_in_hours: '迭代周期',
reflection_period_in_hours_desc: '决定系统多久进行一次记忆反思和提炼',
reflexion_range: '反思范围',
partial: '部分反思 (仅新增记忆)',
all: '全部反思 (所有历史记忆)',
reflexion_range_desc: '',
baseline: '反思基线',
baseline_desc: '',
TIME: '基于时间(时序关系)',
FACT: '基于事实(知识点)',
HYBRID: '事实+时间(综合维度)',
quality_assessment: '启用质量评估',
quality_assessment_desc: '自动评估记忆的准确性、完整性和时效性',
memory_verify: '启用记忆审核',
memory_verify_desc: '检测敏感信息并过滤违规内容',
oneHour: '每1个小时',
threeHours: '每3个小时',
sixHours: '每6个小时',
twelveHours: '每12个小时',
daily: '每天',
run: '运行调试',
example: '原始数据',
exampleText: '我妹妹是2025年出生的哦不对我记错了她其实是2024年出生的。对了我的身份证号码是33252218293749845X。',
runTitle: '反思试运行',
status: '状态',
message: '消息',
conflictDetection: '冲突检测',
reason: '冲突原因',
solution: '解决方案',
qualityAssessment: '质量评估',
qualityAssessmentObj: {
score: '质量评分',
summary: '评估摘要',
},
privacyAudit: '隐私审核',
privacyAuditObj: {
true: '是',
false: '否',
has_privacy: '包含隐私信息',
privacy_types: '隐私类型',
summary: '审核摘要',
}
}
},
}