astonishing-salesclerk-9701
11/19/2025, 10:55 AMlively-winter-88668
11/19/2025, 11:55 AMastonishing-salesclerk-9701
11/19/2025, 12:08 PMastonishing-salesclerk-9701
11/19/2025, 12:08 PMlively-winter-88668
11/19/2025, 1:20 PMastonishing-salesclerk-9701
11/20/2025, 7:36 AMsquare-spoon-72769
11/21/2025, 11:48 AMon_enter no? @lively-winter-88668. We also do
async def on_user_turn_completed(self, turn_ctx: ChatContext, new_message: ChatMessage):
"""
Called when the user has finished their turn - or before the agent starts its first turn
"""
# we need to update instructions in case the context slots were updated since entering
# the given agent
confidence = new_message.transcript_confidence or -1.0
confidence = round(confidence, 2)
logger.info(f"User: {new_message.text_content} ({confidence})")
await self.update_instructions(self.create_prompt())
which helps add things to the context if collected during the last turn. This also helps us to log what the user said and what's the confidence. Is this good practice? (calling update_instructions in on_user_turn_completed)