write agent.py
This commit is contained in:
3
agent.py
3
agent.py
@@ -464,10 +464,12 @@ class SeleniumbaseWebsiteScraper(A2AAgent[SeleniumbaseWebsiteScraperConfig, NoAu
|
|||||||
"reason": "planner suggested URL outside allowed domains; stopping",
|
"reason": "planner suggested URL outside allowed domains; stopping",
|
||||||
"confidence": confidence,
|
"confidence": confidence,
|
||||||
})
|
})
|
||||||
|
step_logs[-1]["decision"] = {"stop": True, "reason": "outside allowed domains"}
|
||||||
break
|
break
|
||||||
|
|
||||||
if action == "stop":
|
if action == "stop":
|
||||||
decisions.append({"step": step, "action": "stop", "reason": reason, "confidence": confidence})
|
decisions.append({"step": step, "action": "stop", "reason": reason, "confidence": confidence})
|
||||||
|
step_logs[-1]["decision"] = {"stop": True, "reason": reason}
|
||||||
break
|
break
|
||||||
|
|
||||||
if action != "scrape":
|
if action != "scrape":
|
||||||
@@ -477,6 +479,7 @@ class SeleniumbaseWebsiteScraper(A2AAgent[SeleniumbaseWebsiteScraperConfig, NoAu
|
|||||||
"reason": "planner returned unknown action",
|
"reason": "planner returned unknown action",
|
||||||
"confidence": confidence,
|
"confidence": confidence,
|
||||||
})
|
})
|
||||||
|
step_logs[-1]["decision"] = {"stop": True, "reason": "unknown action"}
|
||||||
break
|
break
|
||||||
|
|
||||||
# Adopt next plan
|
# Adopt next plan
|
||||||
|
|||||||
Reference in New Issue
Block a user