Skip to content

Commit

Permalink
fix(VanillaReplayStrategy): replay_instructions -> instructions (#849)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrichr authored Jul 12, 2024
1 parent 9f2e7ed commit 640f926
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions openadapt/strategies/vanilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ class VanillaReplayStrategy(strategies.base.BaseReplayStrategy):
def __init__(
self,
recording: models.Recording,
replay_instructions: str = "",
instructions: str = "",
process_events: bool = PROCESS_EVENTS,
) -> None:
"""Initialize the VanillaReplayStrategy.
Args:
recording (models.Recording): The recording object.
replay_instructions (str): Natural language instructions
instructions (str): Natural language instructions
for how recording should be replayed.
process_events (bool): Flag indicating whether to process the events.
Defaults to True.
"""
super().__init__(recording)
self.replay_instructions = replay_instructions
self.instructions = instructions
self.process_events = process_events
self.action_history = []
self.action_event_idx = 0
Expand Down Expand Up @@ -89,7 +89,7 @@ def get_next_action_event(
window_event,
action_events,
self.action_history,
self.replay_instructions,
self.instructions,
)
if not action_event:
raise StopIteration()
Expand Down Expand Up @@ -161,7 +161,7 @@ def generate_action_event(
current_window_event: models.WindowEvent,
recorded_actions: list[models.ActionEvent],
replayed_actions: list[models.ActionEvent],
replay_instructions: str,
instructions: str,
) -> models.ActionEvent:
"""Modify the given ActionEvents according to the given replay instructions.
Expand All @@ -176,7 +176,7 @@ def generate_action_event(
recording
replayed_actions (list[models.ActionEvent]): list of actions produced during
current replay
replay_instructions (str): proposed modifications in natural language
instructions (str): proposed modifications in natural language
instructions
Returns:
Expand All @@ -195,7 +195,7 @@ def generate_action_event(
current_window=current_window_dict,
recorded_actions=recorded_action_dicts,
replayed_actions=replayed_action_dicts,
replay_instructions=replay_instructions,
replay_instructions=instructions,
)
prompt_adapter = adapters.get_default_prompt_adapter()
content = prompt_adapter.prompt(
Expand Down

0 comments on commit 640f926

Please sign in to comment.