fix: retry Agent Step2 once when first write attempt fails
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -125,10 +125,20 @@ def run_agent_workflow(
|
||||
trends = analyze_trends(llm_input, date_str=date_str)
|
||||
if not trends:
|
||||
return None
|
||||
return write_wecom_report(
|
||||
md = write_wecom_report(
|
||||
llm_input,
|
||||
trends,
|
||||
date_str=date_str,
|
||||
time_str=time_str,
|
||||
updated=updated,
|
||||
)
|
||||
if md is None:
|
||||
logger.warning("Agent Step2 首次失败,重试一次")
|
||||
md = write_wecom_report(
|
||||
llm_input,
|
||||
trends,
|
||||
date_str=date_str,
|
||||
time_str=time_str,
|
||||
updated=updated,
|
||||
)
|
||||
return md
|
||||
|
||||
Reference in New Issue
Block a user