mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
1. These aren't the tests you're looking for
2. fixing confirmed signal for now
This commit is contained in:
@@ -48,13 +48,4 @@ See [the guide to adding goals and tools](./adding-goals-and-tools.md) for more
|
|||||||
## For Temporal SAs
|
## 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).
|
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
|
|
||||||
|
|||||||
@@ -215,6 +215,13 @@ class AgentGoalWorkflow:
|
|||||||
workflow.logger.info("Received user signal: confirmation")
|
workflow.logger.info("Received user signal: confirmation")
|
||||||
self.confirmed = True
|
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
|
#Signal that comes from api/main.py via a post to /end-chat
|
||||||
@workflow.signal
|
@workflow.signal
|
||||||
async def end_chat(self) -> None:
|
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
|
# 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:
|
def print_useful_workflow_vars(self, status_or_step:str) -> None:
|
||||||
print(f"***{status_or_step}:***")
|
print(f"***{status_or_step}:***")
|
||||||
|
if self.tool_data:
|
||||||
print(f"force confirm? {self.tool_data['force_confirm']}")
|
print(f"force confirm? {self.tool_data['force_confirm']}")
|
||||||
print(f"next step: {self.tool_data.get('next')}")
|
print(f"next step: {self.tool_data.get('next')}")
|
||||||
print(f"current_tool: {self.tool_data.get('tool')}")
|
print(f"current_tool: {self.tool_data.get('tool')}")
|
||||||
print(f"self.confirm: {self.confirmed}")
|
else:
|
||||||
print(f"waiting_for_confirm (about to be set to true): {self.waiting_for_confirm}")
|
print("no tool data initialized yet")
|
||||||
|
print(f"self.confirmed: {self.confirmed}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user