Skip to content

Commit 8f9a40c

Browse files
committed
remove tracing from tools example
1 parent 47d4f70 commit 8f9a40c

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

openai_agents/workflows/tools_workflow.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from datetime import timedelta
44

5-
from agents import Agent, Runner, trace
5+
from agents import Agent, Runner
66
from temporalio import workflow
77
from temporalio.contrib import openai_agents as temporal_agents
88

@@ -13,16 +13,15 @@
1313
class ToolsWorkflow:
1414
@workflow.run
1515
async def run(self, question: str) -> str:
16-
with trace("Activity as tool"):
17-
agent = Agent(
18-
name="Hello world",
19-
instructions="You are a helpful agent.",
20-
tools=[
21-
temporal_agents.workflow.activity_as_tool(
22-
get_weather, start_to_close_timeout=timedelta(seconds=10)
23-
)
24-
],
25-
)
16+
agent = Agent(
17+
name="Hello world",
18+
instructions="You are a helpful agent.",
19+
tools=[
20+
temporal_agents.workflow.activity_as_tool(
21+
get_weather, start_to_close_timeout=timedelta(seconds=10)
22+
)
23+
],
24+
)
2625

27-
result = await Runner.run(agent, input=question)
28-
return result.final_output
26+
result = await Runner.run(agent, input=question)
27+
return result.final_output

0 commit comments

Comments
 (0)