File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
adapters/vectordb/postgres/src Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1- __version__ = "0.39.0"
2-
1+ __version__ = "0.40.0"
32
43
54def get_sdk_version ():
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ class Constants:
2020 PORT = "port"
2121 USER = "user"
2222 SCHEMA = "schema"
23+ ENABLE_SSL = "enable_ssl"
2324
2425
2526class Postgres (VectorDBAdapter ):
@@ -82,12 +83,17 @@ def _get_vector_db_instance(self) -> BasePydanticVectorStore:
8283 table_name = self ._collection_name ,
8384 embed_dim = dimension ,
8485 )
86+ if self ._config .get (Constants .ENABLE_SSL , True ):
87+ ssl_mode = "require"
88+ else :
89+ ssl_mode = "disable"
8590 self ._client = psycopg2 .connect (
8691 database = self ._config .get (Constants .DATABASE ),
8792 host = self ._config .get (Constants .HOST ),
8893 user = self ._config .get (Constants .USER ),
8994 password = self ._config .get (Constants .PASSWORD ),
9095 port = str (self ._config .get (Constants .PORT )),
96+ sslmode = ssl_mode ,
9197 )
9298
9399 return vector_db
Original file line number Diff line number Diff line change 4141 "title" : " Password" ,
4242 "format" : " password" ,
4343 "default" : " "
44+ },
45+ "enable_ssl" : {
46+ "type" : " boolean" ,
47+ "title" : " Enable SSL" ,
48+ "description" : " On selecting the checkbox, data encryption using SSL is enabled" ,
49+ "default" : true
4450 }
4551 }
4652}
You can’t perform that action at this time.
0 commit comments