Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ extensions = [
"toolbox-adk>=0.5.7, <0.6.0", # For tools.toolbox_toolset.ToolboxToolset
]

firestore = ["google-cloud-firestore>=2.19.0, <3.0.0"]

otel-gcp = ["opentelemetry-instrumentation-google-genai>=0.6b0, <1.0.0"]

toolbox = ["toolbox-adk>=0.5.7, <0.6.0"]
Expand Down
11 changes: 11 additions & 0 deletions src/google/adk/sessions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
__all__ = [
'BaseSessionService',
'DatabaseSessionService',
'FirestoreSessionService',
'InMemorySessionService',
'Session',
'State',
Expand All @@ -38,4 +39,14 @@ def __getattr__(name: str):
'DatabaseSessionService requires sqlalchemy>=2.0, please ensure it is'
' installed correctly.'
) from e
if name == 'FirestoreSessionService':
try:
from .firestore_session_service import FirestoreSessionService

return FirestoreSessionService
except ImportError as e:
raise ImportError(
'FirestoreSessionService requires google-cloud-firestore, please'
' install it with: pip install google-cloud-firestore'
) from e
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
Loading