ADK changes

PiperOrigin-RevId: 754131080
This commit is contained in:
Shangjie Chen
2025-05-02 14:18:38 -07:00
committed by Copybara-Service
parent 879064343c
commit bcf1deb582
7 changed files with 15 additions and 13 deletions

View File

@@ -79,11 +79,11 @@ class ToolContext(CallbackContext):
session_id=self._invocation_context.session.id,
)
def search_memory(self, query: str) -> 'SearchMemoryResponse':
async def search_memory(self, query: str) -> SearchMemoryResponse:
"""Searches the memory of the current user."""
if self._invocation_context.memory_service is None:
raise ValueError('Memory service is not available.')
return self._invocation_context.memory_service.search_memory(
return await self._invocation_context.memory_service.search_memory(
app_name=self._invocation_context.app_name,
user_id=self._invocation_context.user_id,
query=query,