sunholo 0.58.3__py3-none-any.whl → 0.58.5__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.
@@ -1,15 +1,20 @@
1
- import lancedb
2
- import tantivy
1
+ from ..logging import log
3
2
 
4
3
  def create_lancedb_index(bucket, vector_name, num_partitions=256, num_sub_vectors=96, text_key="text"):
4
+ try:
5
+ import lancedb
6
+ #import tantivy
7
+ except ImportError:
8
+ raise ValueError("Could not import lancedb module, install via `pip intall sunholo[database]`")
9
+
5
10
  try:
6
11
  db = lancedb.connect(bucket)
7
12
  tbl = db.open_table(vector_name)
8
13
 
9
14
  tbl.create_index(num_partitions=num_partitions, num_sub_vectors=num_sub_vectors)
10
15
  tbl.create_fts_index(text_key)
11
- print(f'Index creation for {vector_name} success')
16
+ log.info(f'Index creation for {vector_name} success')
12
17
  except Exception as e:
13
- print(f'Index creation for {vector_name} failed: {e}')
18
+ log.info(f'Index creation for {vector_name} failed: {e}')
14
19
 
15
20
 
@@ -23,7 +23,8 @@ if is_running_on_gcp():
23
23
  # Perform a refresh request to get the access token of the current credentials (Else, it's None)
24
24
  gcs_credentials, project_id = google.auth.default()
25
25
  # Prepare global variables for client reuse
26
- gcs_client = storage.Client()
26
+ if storage:
27
+ gcs_client = storage.Client()
27
28
 
28
29
  def refresh_credentials():
29
30
  if not is_running_on_gcp():
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.58.3
3
+ Version: 0.58.5
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.58.3.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.58.5.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -43,7 +43,7 @@ sunholo/components/vectorstore.py,sha256=RB_Dgc9234G_TE3w3abCfBw1pqm2br2RrLP0Uqs
43
43
  sunholo/database/__init__.py,sha256=Zz0Shcq-CtStf9rJGIYB_Ybzb8rY_Q9mfSj-nviM490,241
44
44
  sunholo/database/alloydb.py,sha256=18Q4AG_W-Sz8udIj3gWMkGrMWmiEelqgOwJ7VKHElV0,14877
45
45
  sunholo/database/database.py,sha256=reZrThKyKvMAQXe2RIiEKmKYmsRvGsn7e05OoXjWVSQ,7395
46
- sunholo/database/lancedb.py,sha256=Pa3YVAcruoLDJ8Hl-2Jkfmo5hererEhkNqKXhFRkDvw,512
46
+ sunholo/database/lancedb.py,sha256=WSrbY5mgyeXx6i7UBiz4YQ_i5UIYVYFo-vPGO72bQKY,707
47
47
  sunholo/database/static_dbs.py,sha256=aOyU3AJ-Dzz3qSNjbuN2293cfYw5PhkcQuQxdwPMJ4w,435
48
48
  sunholo/database/uuid.py,sha256=GtUL_uq80u2xkozPF9kwNpvhBf03hbZR3xUhO3NomBM,237
49
49
  sunholo/database/sql/sb/create_function.sql,sha256=HuDyp3fxS5Etop3gGDy28_AuFuhgEgVcq9-q3oeecPU,1033
@@ -56,7 +56,7 @@ sunholo/embedder/__init__.py,sha256=sI4N_CqgEVcrMDxXgxKp1FsfsB4FpjoXgPGkl4N_u4I,
56
56
  sunholo/embedder/embed_chunk.py,sha256=XV1kdDUWw2QO-am5_Yl7GrYP9V_4i1XRNNFPhqUSnZQ,5851
57
57
  sunholo/gcs/__init__.py,sha256=DtVw_AZwQn-IguR5BJuIi2XJeF_FQXizhJikzRNrXiE,50
58
58
  sunholo/gcs/add_file.py,sha256=JmJIuz5Z1h7-eJ6s2eE3wc8Y4IAv3Jridq1xfQbD9_E,4711
59
- sunholo/gcs/download_url.py,sha256=WnRF5H0IX9tyiuD4b_UfV2InsR8kDTi1VYfXpx5_Vc0,4791
59
+ sunholo/gcs/download_url.py,sha256=lSIryVgXJwgIA647zJtQVsQlqKtgLdB0AXHXmmql2L4,4811
60
60
  sunholo/gcs/metadata.py,sha256=C9sMPsHsq1ETetdQCqB3EBs3Kws8b8QHS9L7ei_v5aw,891
61
61
  sunholo/langfuse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  sunholo/langfuse/callback.py,sha256=G9xcZHpLvyzolU57ycItLaooMCtRuM37QJSWjiwQEd0,1776
@@ -89,9 +89,9 @@ sunholo/utils/gcp.py,sha256=B2G1YKjeD7X9dqO86Jrp2vPuFwZ223Xl5Tg09Ndw-oc,5760
89
89
  sunholo/utils/parsers.py,sha256=OrHmASqIbI45atVOhiGodgLvnfrzkvVzyHnSvAXD89I,3841
90
90
  sunholo/vertex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
91
91
  sunholo/vertex/init_vertex.py,sha256=JDMUaBRdednzbKF-5p33qqLit2LMsvgvWW-NRz0AqO0,1801
92
- sunholo-0.58.3.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
93
- sunholo-0.58.3.dist-info/METADATA,sha256=b6EyBKaGDUvY355FAT2ZbVZgnnrFxiowbkhiAcQHe3Q,7877
94
- sunholo-0.58.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
95
- sunholo-0.58.3.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
96
- sunholo-0.58.3.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
97
- sunholo-0.58.3.dist-info/RECORD,,
92
+ sunholo-0.58.5.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
93
+ sunholo-0.58.5.dist-info/METADATA,sha256=W0NKzdTVytQX9Uohr7xXtvcaq7nx9RwyVar7-Gu_zFc,7877
94
+ sunholo-0.58.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
95
+ sunholo-0.58.5.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
96
+ sunholo-0.58.5.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
97
+ sunholo-0.58.5.dist-info/RECORD,,