diff --git a/README.md b/README.md index 91c8c1a..8a97fc7 100644 --- a/README.md +++ b/README.md @@ -48,13 +48,4 @@ See [the guide to adding goals and tools](./adding-goals-and-tools.md) for more ## For Temporal SAs Check out the [slides](https://docs.google.com/presentation/d/1wUFY4v17vrtv8llreKEBDPLRtZte3FixxBUn0uWy5NU/edit#slide=id.g3333e5deaa9_0_0) here and the enablement guide here (TODO). -## Tests -Running the tests requires `poe` and `pytest_asyncio` to be installed. - - python -m pip install poethepoet - python -m pip install pytest_asyncio - -Once you have `poe` and `pytest_asyncio` installed you can run: - - poe test diff --git a/workflows/agent_goal_workflow.py b/workflows/agent_goal_workflow.py index 083332b..78c737d 100644 --- a/workflows/agent_goal_workflow.py +++ b/workflows/agent_goal_workflow.py @@ -215,6 +215,13 @@ class AgentGoalWorkflow: workflow.logger.info("Received user signal: confirmation") self.confirmed = True + #Signal that comes from api/main.py via a post to /confirm + @workflow.signal + async def confirm(self) -> None: + """Signal handler for user confirmation of tool execution.""" + workflow.logger.info("Received user signal: confirmation") + self.confirmed = True + #Signal that comes from api/main.py via a post to /end-chat @workflow.signal async def end_chat(self) -> None: @@ -362,9 +369,11 @@ class AgentGoalWorkflow: # also don't forget you can look at the workflow itself and do queries if you want def print_useful_workflow_vars(self, status_or_step:str) -> None: print(f"***{status_or_step}:***") - print(f"force confirm? {self.tool_data['force_confirm']}") - print(f"next step: {self.tool_data.get('next')}") - print(f"current_tool: {self.tool_data.get('tool')}") - print(f"self.confirm: {self.confirmed}") - print(f"waiting_for_confirm (about to be set to true): {self.waiting_for_confirm}") + if self.tool_data: + print(f"force confirm? {self.tool_data['force_confirm']}") + print(f"next step: {self.tool_data.get('next')}") + print(f"current_tool: {self.tool_data.get('tool')}") + else: + print("no tool data initialized yet") + print(f"self.confirmed: {self.confirmed}")