Toggle navigation
Toggle navigation
This project
Loading...
Sign in
万朱浩
/
Venue-Ops
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
马一丁
2025-12-19 10:18:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
30aa7f45eb8958a9db6962a59fd30169eb0a6230
30aa7f45
1 parent
84560edb
Prevent stale state reuse in knowledge graph build
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
ReportEngine/agent.py
ReportEngine/agent.py
View file @
30aa7f4
...
...
@@ -1609,6 +1609,9 @@ class ReportAgent:
'forum_logs'
:
''
,
'states'
:
{}
# 新增:用于 GraphRAG 的 State JSON
}
# 重要:清空上一次任务的状态数据,防止污染当前任务的知识图谱
self
.
_loaded_states
=
{}
# 加载报告文件
engines
=
[
'query'
,
'media'
,
'insight'
]
...
...
@@ -1630,8 +1633,6 @@ class ReportAgent:
if
parsed_state
:
content
[
'states'
][
engine
]
=
parsed_state
# 同时保存到实例属性,供 _build_knowledge_graph 使用
if
not
hasattr
(
self
,
'_loaded_states'
):
self
.
_loaded_states
=
{}
self
.
_loaded_states
[
engine
]
=
parsed_state
logger
.
info
(
f
"已加载 {engine} State JSON: {len(parsed_state.sections)} 个段落"
)
...
...
Please
register
or
login
to post a comment