This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | async def assist(self, session: Session, query: Query, response_handler: ResponseHandler) -> None: | |
| try: | |
| # We write to the log to find out what is in session.interactions. | |
| logger.info(session.get_interactions()) | |
| await response_handler.respond("response", "This is a test response from the agent.") | |
| except Exception as exc: | |
| logger.error("Something went wrong.", exc_info=True) | |
| await response_handler.emit_error( | |
| "Something went wrong. Please try again later.", | |
| details={"stage": "respond", "error_type": type(exc).__name__} |