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 11:00:23 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
73da6ae73896310913b735110aeaea31668a5c55
73da6ae7
1 parent
d71073ad
Build query params from chapter_targets instead of TemplateSection
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
ReportEngine/agent.py
ReportEngine/agent.py
View file @
73da6ae
...
...
@@ -651,12 +651,20 @@ class ReportAgent:
if
graphrag_enabled
and
knowledge_graph
and
graphrag_query_node
:
try
:
max_queries
=
getattr
(
self
.
config
,
'GRAPHRAG_MAX_QUERIES'
,
3
)
chapter_meta
=
chapter_targets
.
get
(
section
.
chapter_id
,
{})
if
isinstance
(
chapter_targets
,
dict
)
else
{}
emphasis_value
=
chapter_meta
.
get
(
'emphasis'
)
or
chapter_meta
.
get
(
'emphasisPoints'
)
or
''
if
isinstance
(
emphasis_value
,
list
):
emphasis_value
=
';'
.
join
(
str
(
item
)
for
item
in
emphasis_value
if
item
)
role_text
=
getattr
(
section
,
'description'
,
None
)
or
chapter_meta
.
get
(
'rationale'
)
or
''
if
not
isinstance
(
role_text
,
str
):
role_text
=
self
.
_stringify
(
role_text
)
section_info
=
{
'title'
:
section
.
title
,
'id'
:
section
.
chapter_id
,
'role'
:
section
.
description
,
'target_words'
:
chapter_targets
.
get
(
section
.
chapter_id
,
{})
.
get
(
'targetWords'
,
500
),
'emphasis'
:
chapter_targets
.
get
(
section
.
chapter_id
,
{})
.
get
(
'emphasisPoints'
,
''
)
'role'
:
role_text
,
'target_words'
:
chapter_meta
.
get
(
'targetWords'
,
500
),
'emphasis'
:
emphasis_value
}
graph_results
=
graphrag_query_node
.
run
(
...
...
Please
register
or
login
to post a comment