Skip to content

Commit ff6243e

Browse files
committed
Add customer service orchestration
1 parent f93c854 commit ff6243e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

samples-v2/openai_agents/customer_service/main.py renamed to samples-v2/openai_agents/customer_service/customer_service.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations as _annotations
22

3-
import asyncio
43
import random
54
import uuid
65

@@ -170,7 +169,3 @@ async def main():
170169
print(f"{agent_name}: Skipping item: {new_item.__class__.__name__}")
171170
input_items = result.to_input_list()
172171
current_agent = result.last_agent
173-
174-
175-
if __name__ == "__main__":
176-
asyncio.run(main())

samples-v2/openai_agents/function_app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,9 @@ async def random_number_tool(max: int) -> int:
115115
def message_filter(context):
116116
import handoffs.message_filter
117117
return handoffs.message_filter.main(context.create_activity_tool(random_number_tool))
118+
119+
@app.orchestration_trigger(context_name="context")
120+
@app.durable_openai_agent_orchestrator
121+
def customer_service(context):
122+
import customer_service.customer_service
123+
return customer_service.customer_service.main()

0 commit comments

Comments
 (0)