Files
temporal-ai-agent/scripts/end_chat.py
2025-02-15 12:12:39 -08:00

22 lines
511 B
Python

import asyncio
from workflows.agent_goal_workflow import AgentGoalWorkflow
async def main():
# Create client connected to server at the given address
client = await Client.connect("localhost:7233")
workflow_id = "agent-workflow"
handle = client.get_workflow_handle_for(AgentGoalWorkflow.run, workflow_id)
# Sends a signal to the workflow
await handle.signal(AgentGoalWorkflow.end_chat)
if __name__ == "__main__":
print("Sending signal to end chat.")
asyncio.run(main())