style(web): translate the comments in the src/views directory into English
This commit is contained in:
@@ -2153,6 +2153,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
|||||||
resilience: 'Resilience',
|
resilience: 'Resilience',
|
||||||
suggestions: 'Personalized Suggestions',
|
suggestions: 'Personalized Suggestions',
|
||||||
suggestionLoading: 'Your personalized suggestions are being generated',
|
suggestionLoading: 'Your personalized suggestions are being generated',
|
||||||
|
item: 'item',
|
||||||
},
|
},
|
||||||
reflectionEngine: {
|
reflectionEngine: {
|
||||||
reflectionEngineConfig: 'Reflection Engine Configuration',
|
reflectionEngineConfig: 'Reflection Engine Configuration',
|
||||||
|
|||||||
@@ -2242,6 +2242,7 @@ export const zh = {
|
|||||||
resilience: '恢复力',
|
resilience: '恢复力',
|
||||||
suggestions: '个性化建议',
|
suggestions: '个性化建议',
|
||||||
suggestionLoading: '您的个性化建议正在生成中',
|
suggestionLoading: '您的个性化建议正在生成中',
|
||||||
|
item: '个',
|
||||||
},
|
},
|
||||||
reflectionEngine: {
|
reflectionEngine: {
|
||||||
reflectionEngineConfig: '反思引擎配置',
|
reflectionEngineConfig: '反思引擎配置',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 15:52:44
|
* @Date: 2026-02-03 15:52:44
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-03 15:54:22
|
* @Last Modified time: 2026-02-04 10:00:02
|
||||||
*/
|
*/
|
||||||
import { forwardRef, useImperativeHandle, useState } from 'react';
|
import { forwardRef, useImperativeHandle, useState } from 'react';
|
||||||
import { Switch, Button, Tooltip } from 'antd';
|
import { Switch, Button, Tooltip } from 'antd';
|
||||||
@@ -106,7 +106,6 @@ const ApiKeyDetailModal = forwardRef<ApiKeyModalRef, { handleCopy: (content: str
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 高级设置 */}
|
|
||||||
{data.expires_at && <>
|
{data.expires_at && <>
|
||||||
<div className="rb:text-[#5B6167] rb:font-medium rb:leading-5 rb:my-4">{t('apiKey.advancedSettings')}</div>
|
<div className="rb:text-[#5B6167] rb:font-medium rb:leading-5 rb:my-4">{t('apiKey.advancedSettings')}</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 15:52:47
|
* @Date: 2026-02-03 15:52:47
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-03 15:52:47
|
* @Last Modified time: 2026-02-04 10:00:01
|
||||||
*/
|
*/
|
||||||
import { forwardRef, useImperativeHandle, useState } from 'react';
|
import { forwardRef, useImperativeHandle, useState } from 'react';
|
||||||
import { Form, Input, Switch, App, DatePicker } from 'antd';
|
import { Form, Input, Switch, App, DatePicker } from 'antd';
|
||||||
@@ -162,7 +162,6 @@ const ApiKeyModal = forwardRef<ApiKeyModalRef, CreateModalProps>(({
|
|||||||
<Switch />
|
<Switch />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
{/* 高级设置 */}
|
|
||||||
<div className="rb:text-[#5B6167] rb:font-medium rb:leading-5 rb:mb-4">{t('apiKey.advancedSettings')}</div>
|
<div className="rb:text-[#5B6167] rb:font-medium rb:leading-5 rb:mb-4">{t('apiKey.advancedSettings')}</div>
|
||||||
|
|
||||||
<FormItem
|
<FormItem
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ const Agent = forwardRef<AgentRef>((_props, ref) => {
|
|||||||
const { memory, knowledge_retrieval, tools, ...rest } = values
|
const { memory, knowledge_retrieval, tools, ...rest } = values
|
||||||
const { knowledge_bases = [], ...knowledgeRest } = knowledge_retrieval || {}
|
const { knowledge_bases = [], ...knowledgeRest } = knowledge_retrieval || {}
|
||||||
const { memory_content } = memory || {}
|
const { memory_content } = memory || {}
|
||||||
// 从原数据中获取memory的其他必要属性
|
// Get other necessary properties of memory from original data
|
||||||
const originalMemory = data.memory || ({} as MemoryConfig)
|
const originalMemory = data.memory || ({} as MemoryConfig)
|
||||||
|
|
||||||
const params: Config = {
|
const params: Config = {
|
||||||
@@ -425,7 +425,7 @@ const Agent = forwardRef<AgentRef>((_props, ref) => {
|
|||||||
<Knowledge />
|
<Knowledge />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
{/* 记忆配置 */}
|
{/* Memory Configuration */}
|
||||||
<Card title={t('application.memoryConfiguration')}>
|
<Card title={t('application.memoryConfiguration')}>
|
||||||
<Space size={24} direction='vertical' style={{ width: '100%' }}>
|
<Space size={24} direction='vertical' style={{ width: '100%' }}>
|
||||||
<SwitchWrapper title="dialogueHistoricalMemory" desc="dialogueHistoricalMemoryDesc" name={['memory', 'enabled']} />
|
<SwitchWrapper title="dialogueHistoricalMemory" desc="dialogueHistoricalMemoryDesc" name={['memory', 'enabled']} />
|
||||||
@@ -442,7 +442,7 @@ const Agent = forwardRef<AgentRef>((_props, ref) => {
|
|||||||
<VariableList />
|
<VariableList />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
{/* 工具配置 */}
|
{/* Tool Configuration */}
|
||||||
<Form.Item name="tools">
|
<Form.Item name="tools">
|
||||||
<ToolList />
|
<ToolList />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ const Api: FC<{ application: Application | null }> = ({ application }) => {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="rb:text-[#5B6167] rb:text-[12px] rb:mb-2">{t('application.apiKeySubTitle')}</div>
|
<div className="rb:text-[#5B6167] rb:text-[12px] rb:mb-2">{t('application.apiKeySubTitle')}</div>
|
||||||
{/* 总览数据 */}
|
{/* Overview Data */}
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={6}>
|
<Col span={6}>
|
||||||
<Statistic title={t('application.apiKeyTotal')} value={apiKeyList.length} />
|
<Statistic title={t('application.apiKeyTotal')} value={apiKeyList.length} />
|
||||||
@@ -171,7 +171,7 @@ const Api: FC<{ application: Application | null }> = ({ application }) => {
|
|||||||
<Statistic title={t('application.apiKeyRequestTotal')} value={totalRequests} />
|
<Statistic title={t('application.apiKeyRequestTotal')} value={totalRequests} />
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
{/* API Key 列表 */}
|
{/* API Key List */}
|
||||||
{apiKeyList.sort((a, b) => b.created_at - a.created_at).map(item => (
|
{apiKeyList.sort((a, b) => b.created_at - a.created_at).map(item => (
|
||||||
<div key={item.id} className="rb:mt-4 rb:p-[10px_12px] rb:bg-[#F0F3F8] rb:border rb:border-[#DFE4ED] rb:rounded-lg">
|
<div key={item.id} className="rb:mt-4 rb:p-[10px_12px] rb:bg-[#F0F3F8] rb:border rb:border-[#DFE4ED] rb:rounded-lg">
|
||||||
<div className="rb:flex rb:items-center rb:justify-between">
|
<div className="rb:flex rb:items-center rb:justify-between">
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ const ReleasePage: FC<{data: Application; refresh: () => void}> = ({data, refres
|
|||||||
</div>
|
</div>
|
||||||
</RbCard>
|
</RbCard>
|
||||||
|
|
||||||
{/* 日志 */}
|
{/* Logs */}
|
||||||
<RbCard title={t('application.changeLog')} headerType="borderless">
|
<RbCard title={t('application.changeLog')} headerType="borderless">
|
||||||
<Space size={16} direction="vertical" style={{ width: '100%' }}>
|
<Space size={16} direction="vertical" style={{ width: '100%' }}>
|
||||||
{selectedVersion && (
|
{selectedVersion && (
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ const theme = {
|
|||||||
const EditorContent = forwardRef<EditorRef, LexicalEditorProps>(({
|
const EditorContent = forwardRef<EditorRef, LexicalEditorProps>(({
|
||||||
className = '',
|
className = '',
|
||||||
value,
|
value,
|
||||||
placeholder = "请输入内容...",
|
placeholder = "Please enter content...",
|
||||||
onChange,
|
onChange,
|
||||||
}, ref) => {
|
}, ref) => {
|
||||||
const [editor] = useLexicalComposerContext();
|
const [editor] = useLexicalComposerContext();
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ const VariableEditModal = forwardRef<VariableEditModalRef, VariableEditModalProp
|
|||||||
layout="vertical"
|
layout="vertical"
|
||||||
scrollToFirstError={{ behavior: 'instant', block: 'end', focus: true }}
|
scrollToFirstError={{ behavior: 'instant', block: 'end', focus: true }}
|
||||||
>
|
>
|
||||||
{/* 变量类型 */}
|
{/* Variable Type */}
|
||||||
<FormItem
|
<FormItem
|
||||||
name="type"
|
name="type"
|
||||||
label={t('application.variableType')}
|
label={t('application.variableType')}
|
||||||
@@ -154,7 +154,7 @@ const VariableEditModal = forwardRef<VariableEditModalRef, VariableEditModalProp
|
|||||||
optionRender={(props) => <div className="rb:flex rb:justify-between rb:items-center">{props.label} <Tag color="blue">{variableType[props.value as keyof typeof variableType]}</Tag></div>}
|
optionRender={(props) => <div className="rb:flex rb:justify-between rb:items-center">{props.label} <Tag color="blue">{variableType[props.value as keyof typeof variableType]}</Tag></div>}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
{/* 变量名称 */}
|
{/* Variable Name */}
|
||||||
<FormItem
|
<FormItem
|
||||||
name="name"
|
name="name"
|
||||||
label={t('application.variableName')}
|
label={t('application.variableName')}
|
||||||
@@ -172,7 +172,7 @@ const VariableEditModal = forwardRef<VariableEditModalRef, VariableEditModalProp
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
{/* 显示名称 */}
|
{/* Display Name */}
|
||||||
<FormItem
|
<FormItem
|
||||||
name="display_name"
|
name="display_name"
|
||||||
label={t('application.displayName')}
|
label={t('application.displayName')}
|
||||||
@@ -180,14 +180,14 @@ const VariableEditModal = forwardRef<VariableEditModalRef, VariableEditModalProp
|
|||||||
>
|
>
|
||||||
<Input placeholder={t('common.enter')} />
|
<Input placeholder={t('common.enter')} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
{/* 描述 */}
|
{/* Description */}
|
||||||
<FormItem
|
<FormItem
|
||||||
name="description"
|
name="description"
|
||||||
label={t('application.description')}
|
label={t('application.description')}
|
||||||
>
|
>
|
||||||
<Input placeholder={t('common.enter')} />
|
<Input placeholder={t('common.enter')} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
{/* 最大长度 */}
|
{/* Max Length */}
|
||||||
{['text', 'paragraph'].includes(values?.type) && (
|
{['text', 'paragraph'].includes(values?.type) && (
|
||||||
<FormItem
|
<FormItem
|
||||||
name="max_length"
|
name="max_length"
|
||||||
@@ -196,7 +196,7 @@ const VariableEditModal = forwardRef<VariableEditModalRef, VariableEditModalProp
|
|||||||
<InputNumber placeholder={t('common.enter')} style={{ width: '100%' }} />
|
<InputNumber placeholder={t('common.enter')} style={{ width: '100%' }} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
{/* 默认值 */}
|
{/* Default Value */}
|
||||||
{/* {['text', 'paragraph', 'number', 'checkbox'].includes(values?.type) && (
|
{/* {['text', 'paragraph', 'number', 'checkbox'].includes(values?.type) && (
|
||||||
<FormItem
|
<FormItem
|
||||||
name="default_value"
|
name="default_value"
|
||||||
@@ -208,7 +208,7 @@ const VariableEditModal = forwardRef<VariableEditModalRef, VariableEditModalProp
|
|||||||
{['checkbox'].includes(values.type) && <Select options={[{ value: true, label: t('application.defaultChecked') }, { value: false, label: t('application.notDefaultChecked') }]} />}
|
{['checkbox'].includes(values.type) && <Select options={[{ value: true, label: t('application.defaultChecked') }, { value: false, label: t('application.notDefaultChecked') }]} />}
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)} */}
|
)} */}
|
||||||
{/* 选项 */}
|
{/* Options */}
|
||||||
{['dropdownOptions'].includes(values?.type) && (
|
{['dropdownOptions'].includes(values?.type) && (
|
||||||
<FormItem
|
<FormItem
|
||||||
name="options"
|
name="options"
|
||||||
@@ -217,7 +217,7 @@ const VariableEditModal = forwardRef<VariableEditModalRef, VariableEditModalProp
|
|||||||
<SortableList />
|
<SortableList />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
{/* API 扩展 */}
|
{/* API Extension */}
|
||||||
{['apiVariable'].includes(values?.type) && (
|
{['apiVariable'].includes(values?.type) && (
|
||||||
<FormItem
|
<FormItem
|
||||||
name="api_extension"
|
name="api_extension"
|
||||||
@@ -237,14 +237,14 @@ const VariableEditModal = forwardRef<VariableEditModalRef, VariableEditModalProp
|
|||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
{/* 是否必填 */}
|
{/* Required */}
|
||||||
<FormItem
|
<FormItem
|
||||||
name="required"
|
name="required"
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
>
|
>
|
||||||
<Checkbox>{t('application.required')}</Checkbox>
|
<Checkbox>{t('application.required')}</Checkbox>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
{/* 是否隐藏 */}
|
{/* Hidden */}
|
||||||
{/* <FormItem
|
{/* <FormItem
|
||||||
name="hidden"
|
name="hidden"
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 17:00:20
|
* @Date: 2026-02-03 17:00:20
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-03 17:00:20
|
* @Last Modified time: 2026-02-04 10:03:35
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Line Chart Component
|
* Line Chart Component
|
||||||
@@ -126,7 +126,6 @@ const LineChart: FC<LineCardProps> = ({ config }) => {
|
|||||||
}, [t])
|
}, [t])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 语言切换时重新生成数据
|
|
||||||
if (config) {
|
if (config) {
|
||||||
getCaculateData(config)
|
getCaculateData(config)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 16:37:12
|
* @Date: 2026-02-03 16:37:12
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-03 16:37:12
|
* @Last Modified time: 2026-02-04 10:05:39
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Invite Register Page
|
* Invite Register Page
|
||||||
@@ -211,7 +211,7 @@ const InviteRegister: React.FC = () => {
|
|||||||
}
|
}
|
||||||
const { error } = validatePasswordStrength(value);
|
const { error } = validatePasswordStrength(value);
|
||||||
if (error && value.length >= 8) {
|
if (error && value.length >= 8) {
|
||||||
return Promise.resolve(); // 强度提示但不阻止提交
|
return Promise.resolve();
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
return Promise.reject(new Error(error));
|
return Promise.reject(new Error(error));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 17:30:11
|
* @Date: 2026-02-03 17:30:11
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-03 17:30:11
|
* @Last Modified time: 2026-02-04 10:08:49
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Result Component
|
* Result Component
|
||||||
@@ -91,20 +91,20 @@ const Result: FC<ResultProps> = ({ loading, handleSave }) => {
|
|||||||
|
|
||||||
list.forEach((data: AnyObject) => {
|
list.forEach((data: AnyObject) => {
|
||||||
switch(data.event) {
|
switch(data.event) {
|
||||||
case 'text_preprocessing': // 开始预处理文本
|
case 'text_preprocessing': // Start text preprocessing
|
||||||
setTextPreprocessing(prev => ({
|
setTextPreprocessing(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
status: 'processing',
|
status: 'processing',
|
||||||
start_at: data.data.time
|
start_at: data.data.time
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'text_preprocessing_result': // 预处理文本分块中
|
case 'text_preprocessing_result': // Text preprocessing in progress
|
||||||
setTextPreprocessing(prev => ({
|
setTextPreprocessing(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
data: [...prev.data, data.data?.data]
|
data: [...prev.data, data.data?.data]
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'text_preprocessing_complete': // 预处理文本完成
|
case 'text_preprocessing_complete': // Text preprocessing complete
|
||||||
setTextPreprocessing(prev => ({
|
setTextPreprocessing(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
result: data.data?.data,
|
result: data.data?.data,
|
||||||
@@ -112,20 +112,20 @@ const Result: FC<ResultProps> = ({ loading, handleSave }) => {
|
|||||||
end_at: data.data.time
|
end_at: data.data.time
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'knowledge_extraction': // 开始知识抽取
|
case 'knowledge_extraction': // Start knowledge extraction
|
||||||
setKnowledgeExtraction(prev => ({
|
setKnowledgeExtraction(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
status: 'processing',
|
status: 'processing',
|
||||||
start_at: data.data.time
|
start_at: data.data.time
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'knowledge_extraction_result': // 知识抽取中
|
case 'knowledge_extraction_result': // Knowledge extraction in progress
|
||||||
setKnowledgeExtraction(prev => ({
|
setKnowledgeExtraction(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
data: [...prev.data, data.data?.data]
|
data: [...prev.data, data.data?.data]
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'knowledge_extraction_complete': // 知识抽取完成
|
case 'knowledge_extraction_complete': // Knowledge extraction complete
|
||||||
setKnowledgeExtraction(prev => ({
|
setKnowledgeExtraction(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
result: data.data?.data,
|
result: data.data?.data,
|
||||||
@@ -133,20 +133,20 @@ const Result: FC<ResultProps> = ({ loading, handleSave }) => {
|
|||||||
end_at: data.data.time
|
end_at: data.data.time
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'creating_nodes_edges': // 开始创建节点和边
|
case 'creating_nodes_edges': // Start creating nodes and edges
|
||||||
setCreatingNodesEdges(prev => ({
|
setCreatingNodesEdges(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
status: 'processing',
|
status: 'processing',
|
||||||
start_at: data.data.time
|
start_at: data.data.time
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'creating_nodes_edges_result': // 创建节点和边中
|
case 'creating_nodes_edges_result': // Creating nodes and edges in progress
|
||||||
setCreatingNodesEdges(prev => ({
|
setCreatingNodesEdges(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
data: [...prev.data, data.data?.data]
|
data: [...prev.data, data.data?.data]
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'creating_nodes_edges_complete': // 创建节点和边完成
|
case 'creating_nodes_edges_complete': // Creating nodes and edges complete
|
||||||
setCreatingNodesEdges(prev => ({
|
setCreatingNodesEdges(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
result: data.data?.data,
|
result: data.data?.data,
|
||||||
@@ -154,20 +154,20 @@ const Result: FC<ResultProps> = ({ loading, handleSave }) => {
|
|||||||
end_at: data.data.time
|
end_at: data.data.time
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'deduplication': // 开始去重消歧
|
case 'deduplication': // Start deduplication and disambiguation
|
||||||
setDeduplication(prev => ({
|
setDeduplication(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
status: 'processing',
|
status: 'processing',
|
||||||
start_at: data.data.time
|
start_at: data.data.time
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'dedup_disambiguation_result': // 去重消歧中
|
case 'dedup_disambiguation_result': // Deduplication and disambiguation in progress
|
||||||
setDeduplication(prev => ({
|
setDeduplication(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
data: [...prev.data, data.data.data]
|
data: [...prev.data, data.data.data]
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'dedup_disambiguation_complete': // 去重消歧完成
|
case 'dedup_disambiguation_complete': // Deduplication and disambiguation complete
|
||||||
setDeduplication(prev => ({
|
setDeduplication(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
result: data.data?.data,
|
result: data.data?.data,
|
||||||
@@ -175,9 +175,9 @@ const Result: FC<ResultProps> = ({ loading, handleSave }) => {
|
|||||||
end_at: data.data.time
|
end_at: data.data.time
|
||||||
}))
|
}))
|
||||||
break
|
break
|
||||||
case 'generating_results': // 开始生成结果
|
case 'generating_results': // Generating results
|
||||||
break
|
break
|
||||||
case 'result': // 结果
|
case 'result': // Result
|
||||||
setTestResult(data.data?.extracted_result)
|
setTestResult(data.data?.extracted_result)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -228,7 +228,7 @@ const Result: FC<ResultProps> = ({ loading, handleSave }) => {
|
|||||||
<RbAlert color="blue" icon={<ExclamationCircleFilled />} className="rb:mb-3.5">
|
<RbAlert color="blue" icon={<ExclamationCircleFilled />} className="rb:mb-3.5">
|
||||||
{t('memoryExtractionEngine.processing')}
|
{t('memoryExtractionEngine.processing')}
|
||||||
</RbAlert>
|
</RbAlert>
|
||||||
{/* 整体进度 */}
|
{/* Overall Progress */}
|
||||||
<div className="rb:mb-2">
|
<div className="rb:mb-2">
|
||||||
<div className="rb:flex rb:items-center rb:justify-between rb:text-[12px] rb:leading-4 rb:font-regular">
|
<div className="rb:flex rb:items-center rb:justify-between rb:text-[12px] rb:leading-4 rb:font-regular">
|
||||||
{t('memoryExtractionEngine.overallProgress')}
|
{t('memoryExtractionEngine.overallProgress')}
|
||||||
@@ -246,7 +246,7 @@ const Result: FC<ResultProps> = ({ loading, handleSave }) => {
|
|||||||
</RbAlert>
|
</RbAlert>
|
||||||
}
|
}
|
||||||
<Space size={16} direction="vertical" style={{ width: '100%' }}>
|
<Space size={16} direction="vertical" style={{ width: '100%' }}>
|
||||||
{/* 文本预处理 */}
|
{/* Text Preprocessing */}
|
||||||
<RbCard
|
<RbCard
|
||||||
title={t(`memoryExtractionEngine.text_preprocessing`)}
|
title={t(`memoryExtractionEngine.text_preprocessing`)}
|
||||||
extra={formatTag(textPreprocessing.status)}
|
extra={formatTag(textPreprocessing.status)}
|
||||||
@@ -266,7 +266,7 @@ const Result: FC<ResultProps> = ({ loading, handleSave }) => {
|
|||||||
</RbAlert>
|
</RbAlert>
|
||||||
}
|
}
|
||||||
</RbCard>
|
</RbCard>
|
||||||
{/* 知识抽取 */}
|
{/* Knowledge Extraction */}
|
||||||
<RbCard
|
<RbCard
|
||||||
title={t(`memoryExtractionEngine.knowledge_extraction`)}
|
title={t(`memoryExtractionEngine.knowledge_extraction`)}
|
||||||
extra={formatTag(knowledgeExtraction.status)}
|
extra={formatTag(knowledgeExtraction.status)}
|
||||||
@@ -286,7 +286,7 @@ const Result: FC<ResultProps> = ({ loading, handleSave }) => {
|
|||||||
})}
|
})}
|
||||||
</RbAlert>}
|
</RbAlert>}
|
||||||
</RbCard>
|
</RbCard>
|
||||||
{/* 创建实体关系 */}
|
{/* Creating Entity Relationships */}
|
||||||
<RbCard
|
<RbCard
|
||||||
title={t(`memoryExtractionEngine.creating_nodes_edges`)}
|
title={t(`memoryExtractionEngine.creating_nodes_edges`)}
|
||||||
extra={formatTag(creatingNodesEdges.status)}
|
extra={formatTag(creatingNodesEdges.status)}
|
||||||
@@ -306,7 +306,7 @@ const Result: FC<ResultProps> = ({ loading, handleSave }) => {
|
|||||||
{t('memoryExtractionEngine.creating_nodes_edges_desc', {num: creatingNodesEdges.result.entity_entity_edges_count})}
|
{t('memoryExtractionEngine.creating_nodes_edges_desc', {num: creatingNodesEdges.result.entity_entity_edges_count})}
|
||||||
</RbAlert>}
|
</RbAlert>}
|
||||||
</RbCard>
|
</RbCard>
|
||||||
{/* 去重消歧 */}
|
{/* Deduplication and Disambiguation */}
|
||||||
<RbCard
|
<RbCard
|
||||||
title={t(`memoryExtractionEngine.deduplication`)}
|
title={t(`memoryExtractionEngine.deduplication`)}
|
||||||
extra={formatTag(deduplication.status)}
|
extra={formatTag(deduplication.status)}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 17:30:06
|
* @Date: 2026-02-03 17:30:06
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-03 17:30:06
|
* @Last Modified time: 2026-02-04 10:09:45
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Memory Extraction Engine Configuration Constants
|
* Memory Extraction Engine Configuration Constants
|
||||||
@@ -51,11 +51,11 @@ export const configList: ConfigVo[] = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 语义锚点标注
|
// Semantic anchor annotation
|
||||||
{
|
{
|
||||||
title: 'semanticAnchorAnnotationModule',
|
title: 'semanticAnchorAnnotationModule',
|
||||||
list: [
|
list: [
|
||||||
// 句子提取颗粒度
|
// Sentence extraction granularity
|
||||||
{
|
{
|
||||||
label: 'statementGranularity',
|
label: 'statementGranularity',
|
||||||
variableName: 'statement_granularity',
|
variableName: 'statement_granularity',
|
||||||
@@ -66,7 +66,7 @@ export const configList: ConfigVo[] = [
|
|||||||
step: 1,
|
step: 1,
|
||||||
meaning: 'statementGranularityDesc',
|
meaning: 'statementGranularityDesc',
|
||||||
},
|
},
|
||||||
// 是否包含对话上下文
|
// Include dialogue context
|
||||||
{
|
{
|
||||||
label: 'includeDialogueContext',
|
label: 'includeDialogueContext',
|
||||||
variableName: 'include_dialogue_context',
|
variableName: 'include_dialogue_context',
|
||||||
@@ -74,7 +74,7 @@ export const configList: ConfigVo[] = [
|
|||||||
type: 'tinyint',
|
type: 'tinyint',
|
||||||
meaning: 'includeDialogueContextDesc'
|
meaning: 'includeDialogueContextDesc'
|
||||||
},
|
},
|
||||||
// 上下文文字上限
|
// Context text limit
|
||||||
{
|
{
|
||||||
label: 'maxDialogueContextChars',
|
label: 'maxDialogueContextChars',
|
||||||
variableName: 'max_context',
|
variableName: 'max_context',
|
||||||
@@ -111,24 +111,24 @@ export const configList: ConfigVo[] = [
|
|||||||
control: 'select',
|
control: 'select',
|
||||||
type: 'enum',
|
type: 'enum',
|
||||||
options: [
|
options: [
|
||||||
{ label: 'recursiveChunker', value: 'RecursiveChunker' }, // 递归分块
|
{ label: 'recursiveChunker', value: 'RecursiveChunker' }, // Recursive chunking
|
||||||
{ label: 'tokenChunker', value: 'TokenChunker' }, // token 分块
|
{ label: 'tokenChunker', value: 'TokenChunker' }, // Token chunking
|
||||||
{ label: 'semanticChunker', value: 'SemanticChunker' }, // 语义分块
|
{ label: 'semanticChunker', value: 'SemanticChunker' }, // Semantic chunking
|
||||||
{ label: 'neuralChunker', value: 'NeuralChunker' }, // 神经网络分块
|
{ label: 'neuralChunker', value: 'NeuralChunker' }, // Neural network chunking
|
||||||
{ label: 'hybridChunker', value: 'HybridChunker' }, // 混合分块
|
{ label: 'hybridChunker', value: 'HybridChunker' }, // Hybrid chunking
|
||||||
{ label: 'llmChunker', value: 'LLMChunker' }, // LLM 分块
|
{ label: 'llmChunker', value: 'LLMChunker' }, // LLM chunking
|
||||||
{ label: 'sentenceChunker', value: 'SentenceChunker' }, // 句子分块
|
{ label: 'sentenceChunker', value: 'SentenceChunker' }, // Sentence chunking
|
||||||
{ label: 'lateChunker', value: 'LateChunker' }, // 延迟分块
|
{ label: 'lateChunker', value: 'LateChunker' }, // Late chunking
|
||||||
],
|
],
|
||||||
meaning: 'chunkerStrategyDesc',
|
meaning: 'chunkerStrategyDesc',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 智能语义剪枝
|
// Intelligent semantic pruning
|
||||||
{
|
{
|
||||||
title: 'intelligentSemanticPruning',
|
title: 'intelligentSemanticPruning',
|
||||||
list: [
|
list: [
|
||||||
// 智能语义剪枝功能
|
// Intelligent semantic pruning功能
|
||||||
{
|
{
|
||||||
label: 'intelligentSemanticPruningFunction',
|
label: 'intelligentSemanticPruningFunction',
|
||||||
variableName: 'pruning_enabled',
|
variableName: 'pruning_enabled',
|
||||||
@@ -136,7 +136,7 @@ export const configList: ConfigVo[] = [
|
|||||||
type: 'tinyint',
|
type: 'tinyint',
|
||||||
meaning: 'intelligentSemanticPruningFunctionDesc',
|
meaning: 'intelligentSemanticPruningFunctionDesc',
|
||||||
},
|
},
|
||||||
// 智能语义剪枝场景
|
// Intelligent semantic pruning场景
|
||||||
{
|
{
|
||||||
label: 'intelligentSemanticPruningScene',
|
label: 'intelligentSemanticPruningScene',
|
||||||
variableName: 'pruning_scene',
|
variableName: 'pruning_scene',
|
||||||
@@ -149,7 +149,7 @@ export const configList: ConfigVo[] = [
|
|||||||
],
|
],
|
||||||
meaning: 'intelligentSemanticPruningSceneDesc',
|
meaning: 'intelligentSemanticPruningSceneDesc',
|
||||||
},
|
},
|
||||||
// 智能语义剪枝阈值
|
// Intelligent semantic pruning阈值
|
||||||
{
|
{
|
||||||
label: 'intelligentSemanticPruningThreshold',
|
label: 'intelligentSemanticPruningThreshold',
|
||||||
control: 'slider',
|
control: 'slider',
|
||||||
@@ -162,18 +162,18 @@ export const configList: ConfigVo[] = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 自我反思引擎
|
// Self-reflection engine
|
||||||
// {
|
// {
|
||||||
// title: 'reflectionEngine',
|
// title: 'reflectionEngine',
|
||||||
// list: [
|
// list: [
|
||||||
// // 是否启用反思引擎
|
// // Enable reflection engine
|
||||||
// {
|
// {
|
||||||
// label: 'enableSelfReflexion',
|
// label: 'enableSelfReflexion',
|
||||||
// variableName: 'enable_self_reflexion',
|
// variableName: 'enable_self_reflexion',
|
||||||
// control: 'button',
|
// control: 'button',
|
||||||
// type: 'tinyint',
|
// type: 'tinyint',
|
||||||
// },
|
// },
|
||||||
// // 迭代周期
|
// // Iteration period
|
||||||
// {
|
// {
|
||||||
// label: 'iterationPeriod',
|
// label: 'iterationPeriod',
|
||||||
// variableName: 'iteration_period',
|
// variableName: 'iteration_period',
|
||||||
@@ -188,7 +188,7 @@ export const configList: ConfigVo[] = [
|
|||||||
// ],
|
// ],
|
||||||
// meaning: 'iterationPeriodDesc',
|
// meaning: 'iterationPeriodDesc',
|
||||||
// },
|
// },
|
||||||
// // 反思范围
|
// // Reflection range
|
||||||
// {
|
// {
|
||||||
// label: 'reflexionRange',
|
// label: 'reflexionRange',
|
||||||
// variableName: 'reflexion_range',
|
// variableName: 'reflexion_range',
|
||||||
@@ -200,7 +200,7 @@ export const configList: ConfigVo[] = [
|
|||||||
// ],
|
// ],
|
||||||
// meaning: 'reflexionRangeDesc',
|
// meaning: 'reflexionRangeDesc',
|
||||||
// },
|
// },
|
||||||
// // 反思基线
|
// // Reflection baseline
|
||||||
// {
|
// {
|
||||||
// label: 'reflectOnTheBaseline',
|
// label: 'reflectOnTheBaseline',
|
||||||
// variableName: 'baseline',
|
// variableName: 'baseline',
|
||||||
@@ -218,875 +218,6 @@ export const configList: ConfigVo[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
/** Mock module data for testing */
|
|
||||||
export const mockModuleData = [
|
|
||||||
{
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"chunk_index": 1,
|
|
||||||
"content": "用户: 学生:宋朝军事弱势的根源是什么?\n记忆熊:宋朝军事弱势主要源于制度性因素:禁军由文官控制导致作战效率低下,厢军装备不足;军费长期占财政支出一半以上,持续战争加剧财政压力,反向制约军力发展;对外战略被动,缺乏战略纵深且机动能力弱;文官集团压制武将,军权分散,军事专业化难以提升。\n\n学生:我对财政压力与军力不足的关系表示困惑。\n记忆熊:简单说,宋朝军费占财政一半以上,钱越花越多,仗却越打越输。...",
|
|
||||||
"full_length": 416,
|
|
||||||
"dialog_id": "7d11cacd843d45e5942a3ebdc7eb5c8a",
|
|
||||||
"chunker_strategy": "RecursiveChunker"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"chunk_index": 2,
|
|
||||||
"content": "\n学生:我对\"六部缺乏协调机制\"的具体影响表示理解不足。\n记忆熊:原来丞相相当于\"总理\",六部像今天的各部委,大事小情由他统筹。废丞相后,六部直接对皇帝,皇帝一人批不完,部就互相踢皮球。比如打仗,兵部要银子,户部说没有,工部说武器没材料,没人拍板,战事就拖延。\n\n学生:我在复习春秋战国史,对秦国为何能统一六国表示疑问,认为其他国家也较强。\n记忆熊:秦国统一的原因包括:商鞅变法彻底,建立法律、户籍和...",
|
|
||||||
"full_length": 428,
|
|
||||||
"dialog_id": "7d11cacd843d45e5942a3ebdc7eb5c8a",
|
|
||||||
"chunker_strategy": "RecursiveChunker"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"status": "completed",
|
|
||||||
"result": {
|
|
||||||
"total_chunks": 2,
|
|
||||||
"total_dialogs": 1,
|
|
||||||
"chunker_strategy": "RecursiveChunker"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"extraction_type": "statement",
|
|
||||||
"statement_index": 1,
|
|
||||||
"statement": "记忆熊认为宋朝军事弱势主要源于制度性因素。",
|
|
||||||
"statement_id": "dc0e8b331e584525bda5b63beece6449"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "statement",
|
|
||||||
"statement_index": 2,
|
|
||||||
"statement": "记忆熊指出禁军由文官控制导致作战效率低下。",
|
|
||||||
"statement_id": "b60c2c4cbbc3469a8eccf63eaff8af7c"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "statement",
|
|
||||||
"statement_index": 3,
|
|
||||||
"statement": "记忆熊指出厢军装备不足。",
|
|
||||||
"statement_id": "56b912b3424c41c582849ea47f3c9a67"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "statement",
|
|
||||||
"statement_index": 4,
|
|
||||||
"statement": "记忆熊指出宋朝军费长期占财政支出一半以上。",
|
|
||||||
"statement_id": "6e9f5a974b864731b4f45b156ee2b2b9"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "statement",
|
|
||||||
"statement_index": 5,
|
|
||||||
"statement": "记忆熊指出持续战争加剧财政压力,反向制约军力发展。",
|
|
||||||
"statement_id": "4fbcf48493fa40cd97d2e758046a8114"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "statement",
|
|
||||||
"statement_index": 6,
|
|
||||||
"statement": "记忆熊指出宋朝对外战略被动,缺乏战略纵深且机动能力弱。",
|
|
||||||
"statement_id": "672bb8a4aac548a481ab3c6866ff1537"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "statement",
|
|
||||||
"statement_index": 7,
|
|
||||||
"statement": "记忆熊指出文官集团压制武将,军权分散,军事专业化难以提升。",
|
|
||||||
"statement_id": "94f51d5939d440a89600cc1fede8203e"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "statement",
|
|
||||||
"statement_index": 8,
|
|
||||||
"statement": "学生对财政压力与军力不足的关系表示困惑。",
|
|
||||||
"statement_id": "74304297767144fb98e1f28de4397eba"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "statement",
|
|
||||||
"statement_index": 9,
|
|
||||||
"statement": "记忆熊解释宋朝军费占财政一半以上,钱越花越多,仗却越打越输。",
|
|
||||||
"statement_id": "52169673071844d58cc475f350e0e878"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "statement",
|
|
||||||
"statement_index": 10,
|
|
||||||
"statement": "记忆熊指出财政被军费拖垮后,朝廷只能削减装备、裁撤兵员。",
|
|
||||||
"statement_id": "92c5b675666a444d8bba605682376018"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "triplet",
|
|
||||||
"triplet_index": 1,
|
|
||||||
"subject": "记忆熊",
|
|
||||||
"predicate": "MENTIONS",
|
|
||||||
"object": "宋朝军事弱势"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "triplet",
|
|
||||||
"triplet_index": 2,
|
|
||||||
"subject": "宋朝军事弱势",
|
|
||||||
"predicate": "RESULTED_IN",
|
|
||||||
"object": "制度性因素"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "triplet",
|
|
||||||
"triplet_index": 3,
|
|
||||||
"subject": "记忆熊",
|
|
||||||
"predicate": "MENTIONS",
|
|
||||||
"object": "禁军由文官控制导致作战效率低下"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "triplet",
|
|
||||||
"triplet_index": 4,
|
|
||||||
"subject": "禁军由文官控制",
|
|
||||||
"predicate": "RESULTED_IN",
|
|
||||||
"object": "作战效率低下"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "triplet",
|
|
||||||
"triplet_index": 5,
|
|
||||||
"subject": "记忆熊",
|
|
||||||
"predicate": "MENTIONS",
|
|
||||||
"object": "厢军装备不足"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "triplet",
|
|
||||||
"triplet_index": 6,
|
|
||||||
"subject": "记忆熊",
|
|
||||||
"predicate": "MENTIONS",
|
|
||||||
"object": "宋朝"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "triplet",
|
|
||||||
"triplet_index": 7,
|
|
||||||
"subject": "记忆熊",
|
|
||||||
"predicate": "MENTIONS",
|
|
||||||
"object": "军费"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "triplet",
|
|
||||||
"triplet_index": 8,
|
|
||||||
"subject": "军费",
|
|
||||||
"predicate": "HAS_A",
|
|
||||||
"object": "财政支出"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "triplet",
|
|
||||||
"triplet_index": 9,
|
|
||||||
"subject": "宋朝",
|
|
||||||
"predicate": "HAS_REVENUE",
|
|
||||||
"object": "财政支出"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "triplet",
|
|
||||||
"triplet_index": 10,
|
|
||||||
"subject": "持续战争",
|
|
||||||
"predicate": "RESULTED_IN",
|
|
||||||
"object": "财政压力"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "temporal",
|
|
||||||
"temporal_index": 1,
|
|
||||||
"statement": "记忆熊认为宋朝军事弱势主要源于制度性因素。",
|
|
||||||
"valid_at": null,
|
|
||||||
"invalid_at": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "temporal",
|
|
||||||
"temporal_index": 2,
|
|
||||||
"statement": "记忆熊指出禁军由文官控制导致作战效率低下。",
|
|
||||||
"valid_at": null,
|
|
||||||
"invalid_at": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "temporal",
|
|
||||||
"temporal_index": 3,
|
|
||||||
"statement": "记忆熊指出厢军装备不足。",
|
|
||||||
"valid_at": null,
|
|
||||||
"invalid_at": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "temporal",
|
|
||||||
"temporal_index": 4,
|
|
||||||
"statement": "记忆熊指出宋朝军费长期占财政支出一半以上。",
|
|
||||||
"valid_at": null,
|
|
||||||
"invalid_at": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"extraction_type": "temporal",
|
|
||||||
"temporal_index": 5,
|
|
||||||
"statement": "记忆熊指出持续战争加剧财政压力,反向制约军力发展。",
|
|
||||||
"valid_at": null,
|
|
||||||
"invalid_at": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"status": "completed",
|
|
||||||
"result": {
|
|
||||||
"statements": {
|
|
||||||
"count": 38
|
|
||||||
},
|
|
||||||
"entities": {
|
|
||||||
"count": 148
|
|
||||||
},
|
|
||||||
"triplets": {
|
|
||||||
"count": 88
|
|
||||||
},
|
|
||||||
"temporal_ranges_count": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Person",
|
|
||||||
"type_display_name": "人物实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"记忆熊",
|
|
||||||
"记忆熊",
|
|
||||||
"记忆熊",
|
|
||||||
"记忆熊",
|
|
||||||
"记忆熊",
|
|
||||||
"学生",
|
|
||||||
"记忆熊",
|
|
||||||
"学生",
|
|
||||||
"记忆熊",
|
|
||||||
"丞相",
|
|
||||||
"..."
|
|
||||||
],
|
|
||||||
"total_count": 21
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Phenomenon",
|
|
||||||
"type_display_name": "Phenomenon实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"宋朝军事弱势"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Factor",
|
|
||||||
"type_display_name": "Factor实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"制度性因素"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Policy",
|
|
||||||
"type_display_name": "政策实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"禁军由文官控制",
|
|
||||||
"商鞅变法"
|
|
||||||
],
|
|
||||||
"total_count": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Condition",
|
|
||||||
"type_display_name": "条件实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"作战效率低下",
|
|
||||||
"厢军装备不足",
|
|
||||||
"军力发展受制约",
|
|
||||||
"军权分散",
|
|
||||||
"军事专业化难以提升",
|
|
||||||
"官僚体系僵化",
|
|
||||||
"缺乏协作机制",
|
|
||||||
"缺乏协调机制",
|
|
||||||
"难以支撑军队"
|
|
||||||
],
|
|
||||||
"total_count": 9
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Statement",
|
|
||||||
"type_display_name": "Statement实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"禁军由文官控制导致作战效率低下",
|
|
||||||
"没有银子",
|
|
||||||
"武器没材料"
|
|
||||||
],
|
|
||||||
"total_count": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Organization",
|
|
||||||
"type_display_name": "组织实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"宋朝",
|
|
||||||
"宋朝",
|
|
||||||
"文官集团",
|
|
||||||
"宋朝",
|
|
||||||
"朝廷",
|
|
||||||
"官僚体系",
|
|
||||||
"六部",
|
|
||||||
"厂卫机构",
|
|
||||||
"锦衣卫",
|
|
||||||
"东厂",
|
|
||||||
"..."
|
|
||||||
],
|
|
||||||
"total_count": 25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "EconomicMetric",
|
|
||||||
"type_display_name": "EconomicMetric实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"军费",
|
|
||||||
"财政支出",
|
|
||||||
"财政",
|
|
||||||
"军费",
|
|
||||||
"支出"
|
|
||||||
],
|
|
||||||
"total_count": 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Event",
|
|
||||||
"type_display_name": "事件实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"持续战争",
|
|
||||||
"削减装备和裁撤兵员",
|
|
||||||
"战事失利",
|
|
||||||
"废除丞相制度",
|
|
||||||
"废除丞相制度",
|
|
||||||
"废除丞相制度",
|
|
||||||
"大事小情",
|
|
||||||
"废除丞相制度",
|
|
||||||
"无法批阅完所有政务",
|
|
||||||
"政令执行困难",
|
|
||||||
"..."
|
|
||||||
],
|
|
||||||
"total_count": 15
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "EconomicFactor",
|
|
||||||
"type_display_name": "经济因素实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"财政压力"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "EconomicIndicator",
|
|
||||||
"type_display_name": "EconomicIndicator实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"财政支出"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "MilitaryStrategy",
|
|
||||||
"type_display_name": "MilitaryStrategy实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"对外战略被动"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "MilitaryCondition",
|
|
||||||
"type_display_name": "MilitaryCondition实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"缺乏战略纵深",
|
|
||||||
"军力不足"
|
|
||||||
],
|
|
||||||
"total_count": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "MilitaryCapability",
|
|
||||||
"type_display_name": "MilitaryCapability实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"机动能力弱"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "PersonGroup",
|
|
||||||
"type_display_name": "PersonGroup实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"武将"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Concept",
|
|
||||||
"type_display_name": "概念实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"财政压力",
|
|
||||||
"军力不足",
|
|
||||||
"恶性循环",
|
|
||||||
"行政紧张",
|
|
||||||
"系统行政训练",
|
|
||||||
"专业分工",
|
|
||||||
"六部缺乏协调机制",
|
|
||||||
"六部缺乏协调机制",
|
|
||||||
"秦国统一六国的原因"
|
|
||||||
],
|
|
||||||
"total_count": 9
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "EconomicCondition",
|
|
||||||
"type_display_name": "EconomicCondition实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"财政压力"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Action",
|
|
||||||
"type_display_name": "Action实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"削减装备",
|
|
||||||
"裁撤兵员",
|
|
||||||
"再花钱募兵",
|
|
||||||
"建立法律制度",
|
|
||||||
"建立户籍制度",
|
|
||||||
"建立军功爵制度"
|
|
||||||
],
|
|
||||||
"total_count": 6
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "State",
|
|
||||||
"type_display_name": "State实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"军队更弱",
|
|
||||||
"不足",
|
|
||||||
"理解不足"
|
|
||||||
],
|
|
||||||
"total_count": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Outcome",
|
|
||||||
"type_display_name": "Outcome实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"打仗更吃亏",
|
|
||||||
"降低行政效率",
|
|
||||||
"政令推行困难",
|
|
||||||
"提升国家组织能力",
|
|
||||||
"士兵效忠个人而非国家"
|
|
||||||
],
|
|
||||||
"total_count": 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "HistoricalPeriod",
|
|
||||||
"type_display_name": "历史时期实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"宋朝",
|
|
||||||
"春秋战国史",
|
|
||||||
"唐朝史"
|
|
||||||
],
|
|
||||||
"total_count": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "InstitutionalPolicy",
|
|
||||||
"type_display_name": "InstitutionalPolicy实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"废除丞相制度"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "StateOfAffairs",
|
|
||||||
"type_display_name": "StateOfAffairs实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"中央决策高度集中于皇帝"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Role",
|
|
||||||
"type_display_name": "Role实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"协调中枢",
|
|
||||||
"节度使"
|
|
||||||
],
|
|
||||||
"total_count": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Institution",
|
|
||||||
"type_display_name": "Institution实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"科举"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Position",
|
|
||||||
"type_display_name": "职位实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"丞相",
|
|
||||||
"总理",
|
|
||||||
"丞相",
|
|
||||||
"总理"
|
|
||||||
],
|
|
||||||
"total_count": 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Function",
|
|
||||||
"type_display_name": "Function实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"统筹大事小情"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "AdministrativeStructure",
|
|
||||||
"type_display_name": "AdministrativeStructure实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"六部直接对皇帝负责",
|
|
||||||
"六部直接对皇帝负责"
|
|
||||||
],
|
|
||||||
"total_count": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "AdministrativeProblem",
|
|
||||||
"type_display_name": "AdministrativeProblem实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"皇帝一人批不完政务"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Behavior",
|
|
||||||
"type_display_name": "Behavior实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"互相推诿责任"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Resource",
|
|
||||||
"type_display_name": "Resource实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"银子"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Situation",
|
|
||||||
"type_display_name": "Situation实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"没人拍板"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "HistoricalState",
|
|
||||||
"type_display_name": "历史国家实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"秦国"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "PoliticalCharacteristic",
|
|
||||||
"type_display_name": "PoliticalCharacteristic实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"旧贵族势力弱",
|
|
||||||
"中央集权程度高"
|
|
||||||
],
|
|
||||||
"total_count": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Location",
|
|
||||||
"type_display_name": "地点实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"关中"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Attribute",
|
|
||||||
"type_display_name": "Attribute实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"资源丰富",
|
|
||||||
"易守难攻",
|
|
||||||
"政策连续性强"
|
|
||||||
],
|
|
||||||
"total_count": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "HistoricalEvent",
|
|
||||||
"type_display_name": "历史事件实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"安史之乱"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "PoliticalAction",
|
|
||||||
"type_display_name": "PoliticalAction实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"中央整顿"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "PoliticalPhenomenon",
|
|
||||||
"type_display_name": "PoliticalPhenomenon实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"藩镇割据加剧"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "Right",
|
|
||||||
"type_display_name": "Right实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"募兵权",
|
|
||||||
"财政调度权",
|
|
||||||
"军事指挥权"
|
|
||||||
],
|
|
||||||
"total_count": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "EconomicEntity",
|
|
||||||
"type_display_name": "EconomicEntity实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"中央财政"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_nodes_creation",
|
|
||||||
"entity_type": "System",
|
|
||||||
"type_display_name": "系统实体节点",
|
|
||||||
"entity_names": [
|
|
||||||
"募兵制"
|
|
||||||
],
|
|
||||||
"total_count": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "relationship_creation",
|
|
||||||
"relationship_index": 1,
|
|
||||||
"source_entity": "记忆熊",
|
|
||||||
"relation_type": "MENTIONS",
|
|
||||||
"target_entity": "宋朝军事弱势",
|
|
||||||
"relationship_text": "记忆熊 -[MENTIONS]-> 宋朝军事弱势"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "relationship_creation",
|
|
||||||
"relationship_index": 2,
|
|
||||||
"source_entity": "宋朝军事弱势",
|
|
||||||
"relation_type": "RESULTED_IN",
|
|
||||||
"target_entity": "制度性因素",
|
|
||||||
"relationship_text": "宋朝军事弱势 -[RESULTED_IN]-> 制度性因素"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "relationship_creation",
|
|
||||||
"relationship_index": 3,
|
|
||||||
"source_entity": "记忆熊",
|
|
||||||
"relation_type": "MENTIONS",
|
|
||||||
"target_entity": "禁军由文官控制导致作战效率低下",
|
|
||||||
"relationship_text": "记忆熊 -[MENTIONS]-> 禁军由文官控制导致作战效率低下"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "relationship_creation",
|
|
||||||
"relationship_index": 4,
|
|
||||||
"source_entity": "禁军由文官控制",
|
|
||||||
"relation_type": "RESULTED_IN",
|
|
||||||
"target_entity": "作战效率低下",
|
|
||||||
"relationship_text": "禁军由文官控制 -[RESULTED_IN]-> 作战效率低下"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "relationship_creation",
|
|
||||||
"relationship_index": 5,
|
|
||||||
"source_entity": "记忆熊",
|
|
||||||
"relation_type": "MENTIONS",
|
|
||||||
"target_entity": "厢军装备不足",
|
|
||||||
"relationship_text": "记忆熊 -[MENTIONS]-> 厢军装备不足"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "relationship_creation",
|
|
||||||
"relationship_index": 6,
|
|
||||||
"source_entity": "记忆熊",
|
|
||||||
"relation_type": "MENTIONS",
|
|
||||||
"target_entity": "宋朝",
|
|
||||||
"relationship_text": "记忆熊 -[MENTIONS]-> 宋朝"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "relationship_creation",
|
|
||||||
"relationship_index": 7,
|
|
||||||
"source_entity": "记忆熊",
|
|
||||||
"relation_type": "MENTIONS",
|
|
||||||
"target_entity": "军费",
|
|
||||||
"relationship_text": "记忆熊 -[MENTIONS]-> 军费"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "relationship_creation",
|
|
||||||
"relationship_index": 8,
|
|
||||||
"source_entity": "军费",
|
|
||||||
"relation_type": "HAS_A",
|
|
||||||
"target_entity": "财政支出",
|
|
||||||
"relationship_text": "军费 -[HAS_A]-> 财政支出"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "relationship_creation",
|
|
||||||
"relationship_index": 9,
|
|
||||||
"source_entity": "宋朝",
|
|
||||||
"relation_type": "HAS_REVENUE",
|
|
||||||
"target_entity": "财政支出",
|
|
||||||
"relationship_text": "宋朝 -[HAS_REVENUE]-> 财政支出"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "relationship_creation",
|
|
||||||
"relationship_index": 10,
|
|
||||||
"source_entity": "持续战争",
|
|
||||||
"relation_type": "RESULTED_IN",
|
|
||||||
"target_entity": "财政压力",
|
|
||||||
"relationship_text": "持续战争 -[RESULTED_IN]-> 财政压力"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"status": "completed",
|
|
||||||
"result": {
|
|
||||||
"dialogue_nodes_count": 1,
|
|
||||||
"chunk_nodes_count": 2,
|
|
||||||
"statement_nodes_count": 38,
|
|
||||||
"entity_nodes_count": 148,
|
|
||||||
"statement_chunk_edges_count": 38,
|
|
||||||
"statement_entity_edges_count": 148,
|
|
||||||
"entity_entity_edges_count": 88
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"result_type": "entity_merge",
|
|
||||||
"merged_entity_name": "记忆熊",
|
|
||||||
"merged_count": 9,
|
|
||||||
"message": "记忆熊合并9个:相似实体已合并"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_merge",
|
|
||||||
"merged_entity_name": "宋朝",
|
|
||||||
"merged_count": 4,
|
|
||||||
"message": "宋朝合并4个:相似实体已合并"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_merge",
|
|
||||||
"merged_entity_name": "军费",
|
|
||||||
"merged_count": 2,
|
|
||||||
"message": "军费合并2个:相似实体已合并"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_merge",
|
|
||||||
"merged_entity_name": "财政支出",
|
|
||||||
"merged_count": 2,
|
|
||||||
"message": "财政支出合并2个:相似实体已合并"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_merge",
|
|
||||||
"merged_entity_name": "财政压力",
|
|
||||||
"merged_count": 3,
|
|
||||||
"message": "财政压力合并3个:相似实体已合并"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"result_type": "entity_disambiguation",
|
|
||||||
"disambiguated_entity_name": "节度使",
|
|
||||||
"disambiguation_type": "消歧阻断:Role vs Person",
|
|
||||||
"confidence": "0.95",
|
|
||||||
"reason": "实体A类型为'Role',实体B类型为'Person',二者类型完全不同且无别名交集或名称-别名匹配。'节度使'是官职而非具体人物,语义上不应合并。尽管名称文本相似度高,但类型相似度为0.0,且上下文...",
|
|
||||||
"message": "节度使消歧完成:消歧阻断:Role vs Person"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"status": "completed",
|
|
||||||
"result": {
|
|
||||||
"entities": {
|
|
||||||
"original_count": 148,
|
|
||||||
"final_count": 110,
|
|
||||||
"reduced_count": 38,
|
|
||||||
"reduction_rate": 25.7
|
|
||||||
},
|
|
||||||
"statement_entity_edges": {
|
|
||||||
"original_count": 148,
|
|
||||||
"final_count": 148,
|
|
||||||
"reduced_count": 0
|
|
||||||
},
|
|
||||||
"entity_entity_edges": {
|
|
||||||
"original_count": 88,
|
|
||||||
"final_count": 81,
|
|
||||||
"reduced_count": 7
|
|
||||||
},
|
|
||||||
"dedup_examples": [
|
|
||||||
{
|
|
||||||
"type": "精确匹配",
|
|
||||||
"entity_name": "记忆熊",
|
|
||||||
"entity_type": "Person",
|
|
||||||
"merge_count": 8,
|
|
||||||
"description": "记忆熊实体去重合并8个"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "精确匹配",
|
|
||||||
"entity_name": "宋朝",
|
|
||||||
"entity_type": "Organization",
|
|
||||||
"merge_count": 2,
|
|
||||||
"description": "宋朝实体去重合并2个"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "精确匹配",
|
|
||||||
"entity_name": "军费",
|
|
||||||
"entity_type": "EconomicMetric",
|
|
||||||
"merge_count": 1,
|
|
||||||
"description": "军费实体去重合并1个"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "精确匹配",
|
|
||||||
"entity_name": "学生",
|
|
||||||
"entity_type": "Person",
|
|
||||||
"merge_count": 5,
|
|
||||||
"description": "学生实体去重合并5个"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "精确匹配",
|
|
||||||
"entity_name": "废除丞相制度",
|
|
||||||
"entity_type": "Event",
|
|
||||||
"merge_count": 3,
|
|
||||||
"description": "废除丞相制度实体去重合并3个"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"disamb_examples": [
|
|
||||||
{
|
|
||||||
"entity1_name": "节度使",
|
|
||||||
"entity1_type": "Role",
|
|
||||||
"entity2_name": "节度使",
|
|
||||||
"entity2_type": "Person",
|
|
||||||
"description": "节度使和节度使,消歧区分成功"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"summary": {
|
|
||||||
"total_merges": 39,
|
|
||||||
"total_disambiguations": 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
/**
|
/**
|
||||||
* Group data by specified key
|
* Group data by specified key
|
||||||
* @param data - Array of data items
|
* @param data - Array of data items
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ const OntologyClassExtractModal = forwardRef<OntologyClassExtractModalRef, Ontol
|
|||||||
const [targetKeys, setTargetKeys] = useState<TransferProps['targetKeys']>([]);
|
const [targetKeys, setTargetKeys] = useState<TransferProps['targetKeys']>([]);
|
||||||
const [selectedKeys, setSelectedKeys] = useState<TransferProps['selectedKeys']>([]);
|
const [selectedKeys, setSelectedKeys] = useState<TransferProps['selectedKeys']>([]);
|
||||||
|
|
||||||
// 封装取消方法,添加关闭弹窗逻辑
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
@@ -43,7 +42,6 @@ const OntologyClassExtractModal = forwardRef<OntologyClassExtractModalRef, Ontol
|
|||||||
setVisible(true);
|
setVisible(true);
|
||||||
setData(vo)
|
setData(vo)
|
||||||
};
|
};
|
||||||
// 封装保存方法,添加提交逻辑
|
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
if (!data?.scene_id) return;
|
if (!data?.scene_id) return;
|
||||||
form
|
form
|
||||||
@@ -104,7 +102,6 @@ const OntologyClassExtractModal = forwardRef<OntologyClassExtractModalRef, Ontol
|
|||||||
setSelectedKeys([...sourceSelectedKeys, ...targetSelectedKeys].filter(Boolean));
|
setSelectedKeys([...sourceSelectedKeys, ...targetSelectedKeys].filter(Boolean));
|
||||||
};
|
};
|
||||||
|
|
||||||
// 暴露给父组件的方法
|
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
handleOpen,
|
handleOpen,
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ const OntologyClassModal = forwardRef<OntologyClassModalRef, OntologyClassModalP
|
|||||||
const [loading, setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
const [scene_id, setSceneId] = useState<string | null>(null)
|
const [scene_id, setSceneId] = useState<string | null>(null)
|
||||||
|
|
||||||
// 封装取消方法,添加关闭弹窗逻辑
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
@@ -34,7 +33,6 @@ const OntologyClassModal = forwardRef<OntologyClassModalRef, OntologyClassModalP
|
|||||||
setVisible(true);
|
setVisible(true);
|
||||||
setSceneId(scene_id)
|
setSceneId(scene_id)
|
||||||
};
|
};
|
||||||
// 封装保存方法,添加提交逻辑
|
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
if (!scene_id) return;
|
if (!scene_id) return;
|
||||||
form
|
form
|
||||||
@@ -56,7 +54,6 @@ const OntologyClassModal = forwardRef<OntologyClassModalRef, OntologyClassModalP
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 暴露给父组件的方法
|
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
handleOpen,
|
handleOpen,
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ const OntologyModal = forwardRef<OntologyModalRef, OntologyModalProps>(({
|
|||||||
const [form] = Form.useForm<OntologyModalData>();
|
const [form] = Form.useForm<OntologyModalData>();
|
||||||
const [loading, setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
|
|
||||||
// 封装取消方法,添加关闭弹窗逻辑
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
@@ -39,7 +38,6 @@ const OntologyModal = forwardRef<OntologyModalRef, OntologyModalProps>(({
|
|||||||
}
|
}
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
};
|
};
|
||||||
// 封装保存方法,添加提交逻辑
|
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
form
|
form
|
||||||
.validateFields()
|
.validateFields()
|
||||||
@@ -59,7 +57,6 @@ const OntologyModal = forwardRef<OntologyModalRef, OntologyModalProps>(({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 暴露给父组件的方法
|
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
handleOpen,
|
handleOpen,
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 17:37:31
|
* @Date: 2026-02-03 17:37:31
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-03 17:37:51
|
* @Last Modified time: 2026-02-04 10:16:42
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Order Payment Page
|
* Order Payment Page
|
||||||
@@ -227,7 +227,7 @@ const OrderPayment: React.FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="rb:w-full rb:pb-20">
|
<div className="rb:w-full rb:pb-20">
|
||||||
{/* 订单信息 */}
|
{/* Order Information */}
|
||||||
<div className="rb:mb-6">
|
<div className="rb:mb-6">
|
||||||
<h2 className="rb:text-[16px] rb:text-lg rb:font-semibold rb:mb-4">{t('pricing.orderInformation')}</h2>
|
<h2 className="rb:text-[16px] rb:text-lg rb:font-semibold rb:mb-4">{t('pricing.orderInformation')}</h2>
|
||||||
|
|
||||||
@@ -238,9 +238,9 @@ const OrderPayment: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 订单详情表格 */}
|
{/* Order Details Table */}
|
||||||
<div className="rb:border rb:border-[#DFE4ED] rb:rounded-2xl rb:overflow-hidden">
|
<div className="rb:border rb:border-[#DFE4ED] rb:rounded-2xl rb:overflow-hidden">
|
||||||
{/* 桌面端表头 */}
|
{/* Desktop Table Header */}
|
||||||
<div className="rb:flex rb:gap-4 rb:p-4 rb:bg-[rgba(255,255,255,0.03)] rb:border-b rb:border-b-[rgba(255,255,255,0.1)]">
|
<div className="rb:flex rb:gap-4 rb:p-4 rb:bg-[rgba(255,255,255,0.03)] rb:border-b rb:border-b-[rgba(255,255,255,0.1)]">
|
||||||
<div className="rb:flex-1">{t('pricing.comboName')}</div>
|
<div className="rb:flex-1">{t('pricing.comboName')}</div>
|
||||||
<div className="rb:flex-2">{t('pricing.spAndTa')}</div>
|
<div className="rb:flex-2">{t('pricing.spAndTa')}</div>
|
||||||
@@ -248,15 +248,15 @@ const OrderPayment: React.FC = () => {
|
|||||||
<div className="rb:w-32">{t('pricing.orderCycle')}</div>
|
<div className="rb:w-32">{t('pricing.orderCycle')}</div>
|
||||||
<div className="rb:w-32 rb:text-right">{t('pricing.orderAmount')}</div>
|
<div className="rb:w-32 rb:text-right">{t('pricing.orderAmount')}</div>
|
||||||
</div>
|
</div>
|
||||||
{/* 表格内容 */}
|
{/* Table Content */}
|
||||||
<div className="rb:flex rb:p-4 rb:flex-row rb:gap-4">
|
<div className="rb:flex rb:p-4 rb:flex-row rb:gap-4">
|
||||||
{/* 套餐名称 */}
|
{/* Package Name */}
|
||||||
<div className="rb:flex-1">
|
<div className="rb:flex-1">
|
||||||
<div className="rb:hidden rb:text-[12px] rb:text-[#5B6167] rb:mb-1">{t('pricing.comboName')}</div>
|
<div className="rb:hidden rb:text-[12px] rb:text-[#5B6167] rb:mb-1">{t('pricing.comboName')}</div>
|
||||||
<div className="rb:text-[18px] rb:text-xl rb:font-bold rb:mb-1">{orderInfo.comboName}</div>
|
<div className="rb:text-[18px] rb:text-xl rb:font-bold rb:mb-1">{orderInfo.comboName}</div>
|
||||||
<div className="rb:text-[12px] rb:text-[#5B6167]">{orderInfo.comboEdition}</div>
|
<div className="rb:text-[12px] rb:text-[#5B6167]">{orderInfo.comboEdition}</div>
|
||||||
</div>
|
</div>
|
||||||
{/* 解决方案和目标受众 */}
|
{/* Solutions and Target Audience */}
|
||||||
<div className="rb:flex-2 rb:text-[12px] ">
|
<div className="rb:flex-2 rb:text-[12px] ">
|
||||||
<div className="rb:hidden rb:text-[12px] rb:text-[#5B6167] rb:mb-2">{t('pricing.spAndTa')}</div>
|
<div className="rb:hidden rb:text-[12px] rb:text-[#5B6167] rb:mb-2">{t('pricing.spAndTa')}</div>
|
||||||
<div className="rb:mb-4">
|
<div className="rb:mb-4">
|
||||||
@@ -268,7 +268,7 @@ const OrderPayment: React.FC = () => {
|
|||||||
<div className="rb:text-[#5B6167]">{orderInfo.targetAudience}</div>
|
<div className="rb:text-[#5B6167]">{orderInfo.targetAudience}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* 版本信息 */}
|
{/* Version Information */}
|
||||||
<div className="rb:flex-2 rb:text-[12px] rb:space-y-2">
|
<div className="rb:flex-2 rb:text-[12px] rb:space-y-2">
|
||||||
<div className="rb:hidden rb:text-[12px] rb:text-[#5B6167] rb:mb-2">{t('pricing.versionInformation')}</div>
|
<div className="rb:hidden rb:text-[12px] rb:text-[#5B6167] rb:mb-2">{t('pricing.versionInformation')}</div>
|
||||||
<div className="rb:flex rb:items-center rb:gap-2">
|
<div className="rb:flex rb:items-center rb:gap-2">
|
||||||
@@ -296,7 +296,7 @@ const OrderPayment: React.FC = () => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{/* 订购周期和金额 */}
|
{/* Subscription Period and Amount */}
|
||||||
<div className="rb:w-32 rb:text-[12px] rb:text-[#5B6167]">
|
<div className="rb:w-32 rb:text-[12px] rb:text-[#5B6167]">
|
||||||
{orderInfo.orderingCycle}
|
{orderInfo.orderingCycle}
|
||||||
</div>
|
</div>
|
||||||
@@ -308,9 +308,9 @@ const OrderPayment: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 支付方式和支付凭证 */}
|
{/* Payment Method and Payment Voucher */}
|
||||||
<div className="rb:grid rb:grid-cols-2 rb:gap-6">
|
<div className="rb:grid rb:grid-cols-2 rb:gap-6">
|
||||||
{/* 支付方式 */}
|
{/* Payment Method */}
|
||||||
<div className="rb:border rb:border-[#DFE4ED] rb:rounded-2xl rb:p-4">
|
<div className="rb:border rb:border-[#DFE4ED] rb:rounded-2xl rb:p-4">
|
||||||
<h2 className="rb:text-[16px] rb:text-lg rb:font-semibold rb:mb-4">{t('pricing.paymentMethod')}</h2>
|
<h2 className="rb:text-[16px] rb:text-lg rb:font-semibold rb:mb-4">{t('pricing.paymentMethod')}</h2>
|
||||||
|
|
||||||
@@ -352,7 +352,7 @@ const OrderPayment: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 支付凭证 */}
|
{/* Payment Voucher */}
|
||||||
<div className="rb:border rb:border-[#DFE4ED] rb:rounded-2xl rb:p-4">
|
<div className="rb:border rb:border-[#DFE4ED] rb:rounded-2xl rb:p-4">
|
||||||
<h2 className="rb:text-[16px] rb:text-lg rb:font-semibold rb:mb-4">{t('pricing.paymentVoucher')}</h2>
|
<h2 className="rb:text-[16px] rb:text-lg rb:font-semibold rb:mb-4">{t('pricing.paymentVoucher')}</h2>
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ const Prompt: FC<{ editVo: HistoryItem | null; refresh: () => void; }> = ({ edit
|
|||||||
break;
|
break;
|
||||||
case 'end':
|
case 'end':
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
// 流结束时同步表单值
|
// Sync form values when stream ends
|
||||||
form.setFieldsValue({ current_prompt: currentPromptValueRef.current })
|
form.setFieldsValue({ current_prompt: currentPromptValueRef.current })
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,19 +27,19 @@ import SwitchFormItem from '@/components/FormItem/SwitchFormItem'
|
|||||||
|
|
||||||
/** Configuration list */
|
/** Configuration list */
|
||||||
const configList = [
|
const configList = [
|
||||||
// 启用反思引擎
|
// Enable reflection engine
|
||||||
{
|
{
|
||||||
key: 'reflection_enabled',
|
key: 'reflection_enabled',
|
||||||
type: 'switch',
|
type: 'switch',
|
||||||
},
|
},
|
||||||
// 反思模型
|
// Reflection model
|
||||||
{
|
{
|
||||||
key: 'reflection_model_id',
|
key: 'reflection_model_id',
|
||||||
type: 'customSelect',
|
type: 'customSelect',
|
||||||
url: getModelListUrl,
|
url: getModelListUrl,
|
||||||
params: { type: 'chat,llm', page: 1, pagesize: 100, is_active: true }, // chat,llm
|
params: { type: 'chat,llm', page: 1, pagesize: 100, is_active: true }, // chat,llm
|
||||||
},
|
},
|
||||||
// 迭代周期
|
// Iteration period
|
||||||
{
|
{
|
||||||
key: 'reflection_period_in_hours',
|
key: 'reflection_period_in_hours',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@@ -51,7 +51,7 @@ const configList = [
|
|||||||
{ label: 'daily', value: '24' },
|
{ label: 'daily', value: '24' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// 反思范围
|
// Reflection scope
|
||||||
{
|
{
|
||||||
key: 'reflexion_range',
|
key: 'reflexion_range',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@@ -61,7 +61,7 @@ const configList = [
|
|||||||
{ label: 'all', value: 'all' },
|
{ label: 'all', value: 'all' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// 反思基线
|
// Reflection baseline
|
||||||
{
|
{
|
||||||
key: 'baseline',
|
key: 'baseline',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@@ -72,12 +72,12 @@ const configList = [
|
|||||||
{ label: 'HYBRID', value: 'HYBRID' },
|
{ label: 'HYBRID', value: 'HYBRID' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// 质量评估
|
// Quality assessment
|
||||||
{
|
{
|
||||||
key: 'quality_assessment',
|
key: 'quality_assessment',
|
||||||
type: 'switch',
|
type: 'switch',
|
||||||
},
|
},
|
||||||
// 质量评估
|
// Quality assessment
|
||||||
{
|
{
|
||||||
key: 'memory_verify',
|
key: 'memory_verify',
|
||||||
type: 'switch',
|
type: 'switch',
|
||||||
|
|||||||
@@ -159,13 +159,13 @@ const Rag: FC = () => {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 记忆总量 */}
|
{/* Total Memory */}
|
||||||
<div className="rb:font-regular rb:text-[12px] rb:text-[#5B6167] rb:leading-4 rb:mb-6.25">
|
<div className="rb:font-regular rb:text-[12px] rb:text-[#5B6167] rb:leading-4 rb:mb-6.25">
|
||||||
{t('userMemory.totalNumOfMemories')}
|
{t('userMemory.totalNumOfMemories')}
|
||||||
<div className="rb:font-extrabold rb:text-[24px] rb:text-[#212332] rb:leading-7.5 rb:mt-2">{memory || 0}</div>
|
<div className="rb:font-extrabold rb:text-[24px] rb:text-[#212332] rb:leading-7.5 rb:mt-2">{memory || 0}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 关于我 */}
|
{/* About Me */}
|
||||||
<>
|
<>
|
||||||
<Title
|
<Title
|
||||||
type="aboutUs"
|
type="aboutUs"
|
||||||
@@ -188,7 +188,7 @@ const Rag: FC = () => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
{/* 记忆洞察 */}
|
{/* Memory Insights */}
|
||||||
<>
|
<>
|
||||||
<Title
|
<Title
|
||||||
type="memoryInsight"
|
type="memoryInsight"
|
||||||
|
|||||||
@@ -134,11 +134,10 @@ const EmotionTags: FC = () => {
|
|||||||
<div ref={chartRef} className="rb:mt-6 rb:px-6" style={{ height: '320px', width: '100%' }} />
|
<div ref={chartRef} className="rb:mt-6 rb:px-6" style={{ height: '320px', width: '100%' }} />
|
||||||
<div className="rb:flex rb:flex-wrap rb:items-center rb:justify-center rb:gap-10 rb:text-sm rb:mt-3 rb:p-3 rb:bg-[#F0F3F8] rb:rounded-[0_0_8px_8px]">
|
<div className="rb:flex rb:flex-wrap rb:items-center rb:justify-center rb:gap-10 rb:text-sm rb:mt-3 rb:p-3 rb:bg-[#F0F3F8] rb:rounded-[0_0_8px_8px]">
|
||||||
{Object.entries(emotionStats).map(([type, count]) => {
|
{Object.entries(emotionStats).map(([type, count]) => {
|
||||||
console.log(type)
|
|
||||||
return (
|
return (
|
||||||
<div key={type} className="rb:flex rb:items-center rb:gap-2">
|
<div key={type} className="rb:flex rb:items-center rb:gap-2">
|
||||||
<div className="rb:w-3 rb:h-3 rb:rounded-full" style={{ backgroundColor: getEmotionColor(type) }}></div>
|
<div className="rb:w-3 rb:h-3 rb:rounded-full" style={{ backgroundColor: getEmotionColor(type) }}></div>
|
||||||
<span className="rb:leading-5">{t(`statementDetail.${type || 'neutral'}`)} ({count}个)</span>
|
<span className="rb:leading-5">{t(`statementDetail.${type || 'neutral'}`)} ({count}{t('statementDetail.item')})</span>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ const NodeStatistics: FC = () => {
|
|||||||
getNodeStatistics(id).then((res) => {
|
getNodeStatistics(id).then((res) => {
|
||||||
const response = res as NodeStatisticsItem[]
|
const response = res as NodeStatisticsItem[]
|
||||||
setData(response)
|
setData(response)
|
||||||
// 计算count总计
|
// Calculate total count
|
||||||
const totalCount = response.reduce((sum, item) => sum + (item.count || 0), 0)
|
const totalCount = response.reduce((sum, item) => sum + (item.count || 0), 0)
|
||||||
setTotal(totalCount)
|
setTotal(totalCount)
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
|
|||||||
@@ -51,19 +51,19 @@ const RelationshipNetwork:FC = () => {
|
|||||||
const curEdges: Edge[] = []
|
const curEdges: Edge[] = []
|
||||||
const curNodeTypes = Object.keys(statistics.node_types).filter(vo => vo !== 'Dialogue')
|
const curNodeTypes = Object.keys(statistics.node_types).filter(vo => vo !== 'Dialogue')
|
||||||
|
|
||||||
// 计算每个节点的连接数
|
// Calculate connection count for each node
|
||||||
const connectionCount: Record<string, number> = {}
|
const connectionCount: Record<string, number> = {}
|
||||||
edges.forEach(edge => {
|
edges.forEach(edge => {
|
||||||
connectionCount[edge.source] = (connectionCount[edge.source] || 0) + 1
|
connectionCount[edge.source] = (connectionCount[edge.source] || 0) + 1
|
||||||
connectionCount[edge.target] = (connectionCount[edge.target] || 0) + 1
|
connectionCount[edge.target] = (connectionCount[edge.target] || 0) + 1
|
||||||
})
|
})
|
||||||
|
|
||||||
// 处理节点数据
|
// Process node data
|
||||||
nodes.filter(vo => vo.label !== 'Dialogue').forEach(node => {
|
nodes.filter(vo => vo.label !== 'Dialogue').forEach(node => {
|
||||||
const connections = connectionCount[node.id] || 0
|
const connections = connectionCount[node.id] || 0
|
||||||
const categoryIndex = curNodeTypes.indexOf(node.label)
|
const categoryIndex = curNodeTypes.indexOf(node.label)
|
||||||
|
|
||||||
// 根据节点类型获取显示名称
|
// Get display name based on node type
|
||||||
let displayName = ''
|
let displayName = ''
|
||||||
switch (node.label) {
|
switch (node.label) {
|
||||||
// case 'Statement':
|
// case 'Statement':
|
||||||
@@ -93,16 +93,16 @@ const RelationshipNetwork:FC = () => {
|
|||||||
...node,
|
...node,
|
||||||
name: displayName,
|
name: displayName,
|
||||||
category: categoryIndex >= 0 ? categoryIndex : 0,
|
category: categoryIndex >= 0 ? categoryIndex : 0,
|
||||||
symbolSize: symbolSize, // 根据连接数调整节点大小
|
symbolSize: symbolSize, // Adjust node size based on connection count
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// 创建节点ID到标签的映射
|
// Create mapping from node ID to label
|
||||||
const nodeIdToLabel: Record<string, string> = {}
|
const nodeIdToLabel: Record<string, string> = {}
|
||||||
nodes.forEach(node => {
|
nodes.forEach(node => {
|
||||||
nodeIdToLabel[node.id] = node.label
|
nodeIdToLabel[node.id] = node.label
|
||||||
})
|
})
|
||||||
// 处理边数据
|
// Process edge data
|
||||||
edges.forEach(edge => {
|
edges.forEach(edge => {
|
||||||
curEdges.push({
|
curEdges.push({
|
||||||
...edge,
|
...edge,
|
||||||
@@ -112,7 +112,7 @@ const RelationshipNetwork:FC = () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// 设置分类
|
// Set categories
|
||||||
const curCategories = curNodeTypes.map(type => ({ name: type }))
|
const curCategories = curNodeTypes.map(type => ({ name: type }))
|
||||||
|
|
||||||
setNodes(curNodes)
|
setNodes(curNodes)
|
||||||
@@ -160,7 +160,7 @@ const RelationshipNetwork:FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Row gutter={16}>
|
<Row gutter={16}>
|
||||||
{/* 关系网络 */}
|
{/* Relationship Network */}
|
||||||
<Col span={16}>
|
<Col span={16}>
|
||||||
<RbCard
|
<RbCard
|
||||||
title={t('userMemory.relationshipNetwork')}
|
title={t('userMemory.relationshipNetwork')}
|
||||||
@@ -211,22 +211,22 @@ const RelationshipNetwork:FC = () => {
|
|||||||
},
|
},
|
||||||
force: {
|
force: {
|
||||||
repulsion: 100,
|
repulsion: 100,
|
||||||
// 启用类别聚合
|
// Enable category aggregation
|
||||||
edgeLength: 80,
|
edgeLength: 80,
|
||||||
gravity: 0.3,
|
gravity: 0.3,
|
||||||
// 同类别的节点相互吸引
|
// Nodes of the same category attract each other
|
||||||
layoutAnimation: true,
|
layoutAnimation: true,
|
||||||
// 防止点击时重新计算布局
|
// Prevent layout recalculation on click
|
||||||
preventOverlap: true,
|
preventOverlap: true,
|
||||||
// 点击节点后保持布局稳定
|
// Keep layout stable after node click
|
||||||
edgeSymbol: ['none', 'arrow'],
|
edgeSymbol: ['none', 'arrow'],
|
||||||
edgeSymbolSize: [4, 10],
|
edgeSymbolSize: [4, 10],
|
||||||
// 初始布局完成后关闭力导向
|
// Disable force-directed after initial layout
|
||||||
initLayout: 'force'
|
initLayout: 'force'
|
||||||
},
|
},
|
||||||
selectedMode: 'single',
|
selectedMode: 'single',
|
||||||
draggable: true,
|
draggable: true,
|
||||||
// 防止数据更新时重新计算布局
|
// Prevent layout recalculation on data update
|
||||||
animationDurationUpdate: 0,
|
animationDurationUpdate: 0,
|
||||||
select: {
|
select: {
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
@@ -242,12 +242,12 @@ const RelationshipNetwork:FC = () => {
|
|||||||
notMerge={false}
|
notMerge={false}
|
||||||
lazyUpdate={true}
|
lazyUpdate={true}
|
||||||
onEvents={{
|
onEvents={{
|
||||||
// 节点点击事件处理
|
// Node click event handler
|
||||||
click: (params: { dataType: string; data: Node; name: string }) => {
|
click: (params: { dataType: string; data: Node; name: string }) => {
|
||||||
if (params.dataType === 'node') {
|
if (params.dataType === 'node') {
|
||||||
// 处理节点点击事件
|
// Handle node click event
|
||||||
console.log('Node clicked:', params.data);
|
console.log('Node clicked:', params.data);
|
||||||
// 使用函数式更新避免状态依赖问题
|
// Use functional update to avoid state dependency issues
|
||||||
setSelectedNode(params.data)
|
setSelectedNode(params.data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,7 @@ const RelationshipNetwork:FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</RbCard>
|
</RbCard>
|
||||||
</Col>
|
</Col>
|
||||||
{/* 记忆详情 */}
|
{/* Memory Details */}
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<RbCard
|
<RbCard
|
||||||
title={t('userMemory.memoryDetails')}
|
title={t('userMemory.memoryDetails')}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ const WordCloud: FC = () => {
|
|||||||
const radarOption = useMemo(() => {
|
const radarOption = useMemo(() => {
|
||||||
if (!wordCloud?.tags.length) return {}
|
if (!wordCloud?.tags.length) return {}
|
||||||
|
|
||||||
// 将avg_intensity转换为1-100范围
|
// Convert avg_intensity to 1-100 range
|
||||||
const radarData = wordCloud.tags.map(item => ({
|
const radarData = wordCloud.tags.map(item => ({
|
||||||
name: item.emotion_type,
|
name: item.emotion_type,
|
||||||
value: Math.round(item.avg_intensity * 100),
|
value: Math.round(item.avg_intensity * 100),
|
||||||
|
|||||||
Reference in New Issue
Block a user