Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e21b1f

Browse files
committed
Preserve user feedback
1 parent62c8ffc commit1e21b1f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

‎src/open_deep_research/graph.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ async def generate_report_plan(state: ReportState, config: RunnableConfig):
5858

5959
# Inputs
6060
topic=state["topic"]
61-
feedback=state.get("feedback_on_report_plan",None)
61+
62+
# Get list of feedback on the report plan
63+
feedback_list=state.get("feedback_on_report_plan", [])
64+
65+
# Concatenate feedback on the report plan into a single string
66+
feedback=" /// ".join(feedback_list)iffeedback_listelse""
6267

6368
# Get configuration
6469
configurable=Configuration.from_runnable_config(config)
@@ -174,9 +179,9 @@ def human_feedback(state: ReportState, config: RunnableConfig) -> Command[Litera
174179

175180
# If the user provides feedback, regenerate the report plan
176181
elifisinstance(feedback,str):
177-
# Treat this as feedback
182+
# Treat this as feedback and append it to the existing list
178183
returnCommand(goto="generate_report_plan",
179-
update={"feedback_on_report_plan":feedback})
184+
update={"feedback_on_report_plan":[feedback]})
180185
else:
181186
raiseTypeError(f"Interrupt value of type{type(feedback)} is not supported.")
182187

‎src/open_deep_research/state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ReportStateOutput(TypedDict):
4545

4646
classReportState(TypedDict):
4747
topic:str# Report topic
48-
feedback_on_report_plan:str# Feedback on the report plan
48+
feedback_on_report_plan:Annotated[list[str],operator.add]# List of feedback on the report plan
4949
sections:list[Section]# List of report sections
5050
completed_sections:Annotated[list,operator.add]# Send() API key
5151
report_sections_from_research:str# String of any completed sections from research to write final sections

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp