Skip to content

Commit af0a5e6

Browse files
committed
Make run_activity function asynchronous in activity_as_tool
1 parent 9ca14a7 commit af0a5e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples-v2/openai_agents/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def activity_as_tool(context: DurableAIAgentContext, activity_func: Callable) ->
3030

3131
activity_name = activity_func._function._name
3232

33-
def run_activity(ctx: RunContextWrapper[Any], input: str) -> Any:
33+
async def run_activity(ctx: RunContextWrapper[Any], input: str) -> Any:
3434
result = context.get_activity_call_result(activity_name, input)
3535
return result
3636

0 commit comments

Comments
 (0)