File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
veadk/memory/short_term_memory_backends Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,12 @@ database:
105105 database:
106106 charset: utf8
107107 # [optional]
108+ postgresql:
109+ host: # host or ip
110+ user:
111+ password:
112+ database: # database with options sinlardb?sslmode=require&channel_binding=require&options=endpoint%3Dcp-great-pearl-0a074332
113+ # [optional]
108114 redis:
109115 host:
110116 port: 6379 # default Redis port
Original file line number Diff line number Diff line change 1414
1515from functools import cached_property
1616from typing import Any
17+ from venv import logger
1718
1819from google .adk .sessions import (
1920 BaseSessionService ,
@@ -33,7 +34,8 @@ class PostgreSqlSTMBackend(BaseShortTermMemoryBackend):
3334 postgresql_config : PostgreSqlConfig = Field (default_factory = PostgreSqlConfig )
3435
3536 def model_post_init (self , context : Any ) -> None :
36- self ._db_url = f"postgresql+psycopg2://{ self .postgresql_config .user } :{ self .postgresql_config .password } @{ self .postgresql_config .host } :{ self .postgresql_config .port } /{ self .postgresql_config .database } "
37+ self ._db_url = f"postgresql://{ self .postgresql_config .user } :{ self .postgresql_config .password } @{ self .postgresql_config .host } :{ self .postgresql_config .port } /{ self .postgresql_config .database } "
38+ logger .debug (self ._db_url )
3739
3840 @cached_property
3941 @override
You can’t perform that action at this time.
0 commit comments