File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
samples-v2/openai_agents/customer_service Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations as _annotations
22
33import random
4- import uuid
54
5+ from azure .durable_functions .openai_agents import DurableAIAgentContext
66from pydantic import BaseModel
77
88from agents import (
@@ -138,18 +138,18 @@ async def on_seat_booking_handoff(context: RunContextWrapper[AirlineAgentContext
138138### RUN
139139
140140
141- def main (context ):
141+ def main (context : DurableAIAgentContext ):
142142 current_agent : Agent [AirlineAgentContext ] = triage_agent
143143 input_items : list [TResponseInputItem ] = []
144- context = AirlineAgentContext ()
144+ airline_agent_context = AirlineAgentContext ()
145145
146146 conversation_id = context .instance_id
147147
148148 while True :
149149 user_input = context .wait_for_external_event ("UserInput" )
150150 with trace ("Customer service" , group_id = conversation_id ):
151151 input_items .append ({"content" : user_input , "role" : "user" })
152- result = Runner .run_sync (current_agent , input_items , context = context )
152+ result = Runner .run_sync (current_agent , input_items , context = airline_agent_context )
153153
154154 for new_item in result .new_items :
155155 agent_name = new_item .agent .name
You can’t perform that action at this time.
0 commit comments