Skip to content

Commit cdb0ce5

Browse files
committed
Rename activity_as_tool to create_activity_tool.
1 parent 0e534bc commit cdb0ce5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

azure/durable_functions/openai_agents/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def wait_for_external_event(self, event_name: str):
4646
"""Wait for an external event in the orchestration."""
4747
return self._context.wait_for_external_event(event_name)
4848

49-
def activity_as_tool(
49+
def create_activity_tool(
5050
self,
5151
activity_func: Callable,
5252
*,

tests/orchestrator/openai_agents/test_openai_agents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def openai_agent_use_tool(context):
5151
agent = Agent(
5252
name="Assistant",
5353
instructions="You only respond in haikus.",
54-
tools=[context.activity_as_tool(get_weather, retry_options=None)]
54+
tools=[context.create_activity_tool(get_weather, retry_options=None)]
5555
)
5656

5757
result = Runner.run_sync(agent, "Tell me the weather in Seattle.", )

0 commit comments

Comments
 (0)