Skip to content

Commit

Permalink
Merge pull request #81 from PathOnAI/replay-cleanup
Browse files Browse the repository at this point in the history
Replay cleanup
  • Loading branch information
IBMC265 authored Sep 25, 2024
2 parents eece7b2 + d21283d commit 4700aed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions litewebagent/agents/SearchAgents/PromptSearchAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def bfs(self):
"status": "pending",
"depth": depth,
}
logger.info(trajectory_record)
self.trajectories.append(trajectory_record)

try:
Expand Down
5 changes: 4 additions & 1 deletion litewebagent/utils/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ def take_action(step, playwright_manager, is_replay, log_folder):
_post_extract(page)
url = page.url
element = find_matching_element(interactive_elements, step)
action = replace_number(step["action"], element['bid'])
if element:
action = replace_number(step["action"], element['bid'])
else:
action = step["action"]
code, function_calls = action_set.to_python_code(action)
logger.info("Executing action script")
if is_replay:
Expand Down

0 comments on commit 4700aed

Please sign in to comment.