Skip to content

Commit f3393de

Browse files
committed
remove unused context mananager
1 parent 282d549 commit f3393de

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

openai_agents/run_hello_world_workflow.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
from temporalio.client import Client
55
from temporalio.common import WorkflowIDReusePolicy
6-
from temporalio.contrib.openai_agents.temporal_openai_agents import (
7-
set_open_ai_agent_temporal_overrides,
8-
)
96

107
from openai_agents.workflows.hello_world_workflow import HelloWorldAgent
118

@@ -14,18 +11,15 @@ async def main():
1411
# Create client connected to server at the given address
1512
client = await Client.connect("localhost:7233")
1613

17-
with set_open_ai_agent_temporal_overrides(
18-
start_to_close_timeout=timedelta(seconds=10)
19-
):
20-
# Execute a workflow
21-
result = await client.execute_workflow(
22-
HelloWorldAgent.run,
23-
"Tell me about recursion in programming.",
24-
id="my-workflow-id",
25-
task_queue="my-task-queue",
26-
id_reuse_policy=WorkflowIDReusePolicy.TERMINATE_IF_RUNNING,
27-
)
28-
print(f"Result: {result}")
14+
# Execute a workflow
15+
result = await client.execute_workflow(
16+
HelloWorldAgent.run,
17+
"Tell me about recursion in programming.",
18+
id="my-workflow-id",
19+
task_queue="my-task-queue",
20+
id_reuse_policy=WorkflowIDReusePolicy.TERMINATE_IF_RUNNING,
21+
)
22+
print(f"Result: {result}")
2923

3024

3125
if __name__ == "__main__":

0 commit comments

Comments
 (0)