File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
samples-v2/openai_agents/customer_service Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,10 @@ def main(context: DurableAIAgentContext):
145145
146146 conversation_id = context .instance_id
147147
148+ context .set_custom_status ("How can I help you today?" )
148149 while True :
149150 user_input = yield context .wait_for_external_event ("UserInput" )
151+ context .set_custom_status ("Thinking..." )
150152 with trace ("Customer service" , group_id = conversation_id ):
151153 input_items .append ({"content" : user_input , "role" : "user" })
152154 result = Runner .run_sync (current_agent , input_items , context = airline_agent_context )
@@ -167,3 +169,5 @@ def main(context: DurableAIAgentContext):
167169 print (f"{ agent_name } : Skipping item: { new_item .__class__ .__name__ } " )
168170 input_items = result .to_input_list ()
169171 current_agent = result .last_agent
172+
173+ context .set_custom_status (result .final_output )
You can’t perform that action at this time.
0 commit comments