(self, prompt: str)
| 56 | ).id |
| 57 | |
| 58 | def run(self, prompt: str) -> list[Event]: |
| 59 | current_session = self.session_service.get_session( |
| 60 | app_name=self.app_name, |
| 61 | user_id=self.user_id, |
| 62 | session_id=self.current_session_id, |
| 63 | ) |
| 64 | assert current_session is not None |
| 65 | |
| 66 | return list( |
| 67 | self.agent_client.run( |
| 68 | user_id=current_session.user_id, |
| 69 | session_id=current_session.id, |
| 70 | new_message=types.Content( |
| 71 | role="user", |
| 72 | parts=[types.Part.from_text(text=prompt)], |
| 73 | ), |
| 74 | ) |
| 75 | ) |
| 76 | |
| 77 | def get_current_session(self) -> Optional[Session]: |
| 78 | return self.session_service.get_session( |
no test coverage detected