sunholo 0.91.0__py3-none-any.whl → 0.91.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,7 @@ class AlloyDBClient:
63
63
  if not alloydb_config:
64
64
  raise ValueError("Must specify vac.alloydb_config")
65
65
  self.config = alloydb_config
66
- self.vector_name = self.config.vector_name
66
+ self.vector_name = self.config.get("vac")
67
67
  project_id = alloydb_config["project_id"]
68
68
  region = alloydb_config["region"]
69
69
  cluster_name = alloydb_config["cluster"]
@@ -141,8 +141,8 @@ class AlloyDBClient:
141
141
 
142
142
  return engine
143
143
 
144
- def _get_embedder(self, vector_name):
145
- return get_embeddings(vector_name)
144
+ def _get_embedder(self):
145
+ return get_embeddings(self.vector_name)
146
146
 
147
147
  def get_vectorstore(self):
148
148
  if self.engine_type != "langchain":
@@ -158,7 +158,7 @@ class AlloyDBClient:
158
158
  self.vectorstore = AlloyDBVectorStore.create_sync(
159
159
  engine=self.engine,
160
160
  table_name=table_name,
161
- embedding_service=self._get_embedder(self.vector_name),
161
+ embedding_service=self._get_embedder(),
162
162
  metadata_columns=["source", "docstore_doc_id"]
163
163
  #metadata_columns=["source", "eventTime"]
164
164
  )
@@ -176,13 +176,13 @@ class AlloyDBClient:
176
176
 
177
177
  return query, source_filter_cmd
178
178
 
179
- def similarity_search(self, query, source_filter:str="", free_filter:str=None, k:int=5):
179
+ def similarity_search(self, query:str, source_filter:str="", free_filter:str=None, k:int=5):
180
180
 
181
181
  query, source_filter_cmd = self._similarity_search(query, source_filter, free_filter)
182
182
 
183
183
  return self.vectorstore.similarity_search(query, filter=source_filter_cmd, k=k)
184
184
 
185
- async def asimilarity_search(self, query, source_filter:str="", free_filter:str=None, k:int=5):
185
+ async def asimilarity_search(self, query:str, source_filter:str="", free_filter:str=None, k:int=5):
186
186
  query, source_filter_cmd = self._similarity_search(query, source_filter, free_filter)
187
187
 
188
188
  return await self.vectorstore.asimilarity_search(query, filter=source_filter_cmd, k=k)
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.91.0
3
+ Version: 0.91.1
4
4
  Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
5
5
  Home-page: https://github.com/sunholo-data/sunholo-py
6
- Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.91.0.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.91.1.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -59,7 +59,7 @@ sunholo/components/retriever.py,sha256=bKIVT7_18Ut3OJd0E0jyiISPnD9qkHWVjcQPT4i1_
59
59
  sunholo/components/vectorstore.py,sha256=xKk7micTRwZckaI7U6PxvFz_ZSjCH48xPTDYiDcv2tc,5913
60
60
  sunholo/database/__init__.py,sha256=bpB5Nk21kwqYj-qdVnvNgXjLsbflnH4g-San7OHMqR4,283
61
61
  sunholo/database/alloydb.py,sha256=YH8wNPS8gN-TDZEXQcVHxwd1NScHRfAxma3gK4R6KCk,11740
62
- sunholo/database/alloydb_client.py,sha256=gMTV1rno3pZfPQy-I3YBE_MiXQePcu8Mcki_Kmq3Hj0,17019
62
+ sunholo/database/alloydb_client.py,sha256=urXmesN-41FrjmYIy1ybp7zUdw7Y4UnVUhWDacBELAU,17002
63
63
  sunholo/database/database.py,sha256=VqhZdkXUNdvWn8sUcUV3YNby1JDVf7IykPVXWBtxo9U,7361
64
64
  sunholo/database/lancedb.py,sha256=DyfZntiFKBlVPaFooNN1Z6Pl-LAs4nxWKKuq8GBqN58,715
65
65
  sunholo/database/static_dbs.py,sha256=8cvcMwUK6c32AS2e_WguKXWMkFf5iN3g9WHzsh0C07Q,442
@@ -144,9 +144,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
144
144
  sunholo/vertex/memory_tools.py,sha256=q_phxgGX2TG2j2MXNULF2xGzQnQPENwjPN9nZ_A9Gh0,7526
145
145
  sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
146
146
  sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
147
- sunholo-0.91.0.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
- sunholo-0.91.0.dist-info/METADATA,sha256=88KfGdcucBZTtc-oEMicxB6actR75TcMt0ktdqvbJ_4,7806
149
- sunholo-0.91.0.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
150
- sunholo-0.91.0.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
- sunholo-0.91.0.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
- sunholo-0.91.0.dist-info/RECORD,,
147
+ sunholo-0.91.1.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
+ sunholo-0.91.1.dist-info/METADATA,sha256=VV2CVfBHDRqyFrsgGDzyd-xfFC8gOGn9LTZvuDwjO0Y,7806
149
+ sunholo-0.91.1.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
150
+ sunholo-0.91.1.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
+ sunholo-0.91.1.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
+ sunholo-0.91.1.dist-info/RECORD,,