diff --git a/openai_agents/run_hello_world_workflow.py b/openai_agents/run_hello_world_workflow.py index 566d525..76344d8 100644 --- a/openai_agents/run_hello_world_workflow.py +++ b/openai_agents/run_hello_world_workflow.py @@ -1,4 +1,5 @@ import asyncio +import sys from temporalio.client import Client from temporalio.contrib.pydantic import pydantic_data_converter @@ -7,6 +8,12 @@ async def main(): + # Get the input string from command line arguments + if len(sys.argv) < 2: + print("Usage: python run_hello_world_workflow.py ") + sys.exit(1) + input_string = sys.argv[1] + # Create client connected to server at the given address client = await Client.connect( "localhost:7233", @@ -16,7 +23,7 @@ async def main(): # Execute a workflow result = await client.execute_workflow( HelloWorldAgent.run, - "Tell me about recursion in programming.", + input_string, id="my-workflow-id", task_queue="openai-agents-task-queue", )