sunholo 0.69.8__py3-none-any.whl → 0.69.9__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,5 +1,6 @@
1
1
  from ..logging import log
2
2
  from ..utils.config import load_config_key
3
+ from ..utils.gcp_project import get_gcp_project
3
4
  from ..components import load_memories
4
5
 
5
6
  from .discovery_engine_client import DiscoveryEngineClient
@@ -20,11 +21,6 @@ def do_discovery_engine(message_data, metadata, vector_name):
20
21
  ```
21
22
  """
22
23
 
23
- global_gcp_config = load_config_key("gcp_config", vector_name="global", kind="vacConfig")
24
- gcp_config = load_config_key("gcp_config", vector_name=vector_name, kind="vacConfig")
25
- if not gcp_config and not global_gcp_config:
26
- raise ValueError(f"Need config.{vector_name}.gcp_config to configure discovery engine")
27
-
28
24
  memories = load_memories(vector_name)
29
25
  tools = []
30
26
 
@@ -38,11 +34,10 @@ def do_discovery_engine(message_data, metadata, vector_name):
38
34
  vectorstore = value.get('vectorstore')
39
35
  if vectorstore == "discovery_engine" or vectorstore == "vertex_ai_search":
40
36
  log.info(f"Found vectorstore {vectorstore}")
41
- project_id = gcp_config.get('project_id') or global_gcp_config['project_id']
42
37
  #location = gcp_config.get('location')
43
38
  corpus = DiscoveryEngineClient(
44
39
  data_store_id=vector_name,
45
- project_id=project_id,
40
+ project_id=get_gcp_project(),
46
41
  # location needs to be 'eu' or 'us' which doesn't work with other configurations
47
42
  #location=location or global_location
48
43
  )
@@ -1,9 +1,8 @@
1
1
  from .discovery_engine_client import DiscoveryEngineClient
2
2
  from ..utils.config import load_config_key
3
+ from ..utils.gcp_project import get_gcp_project
3
4
 
4
5
  def create_new_discovery_engine(vector_name):
5
- global_config = load_config_key("gcp_config", "global", kind="vacConfig")
6
- gcp_config = load_config_key("gcp_config", vector_name=vector_name, kind="vacConfig")
7
6
 
8
7
  chunker_config = load_config_key("chunker", vector_name=vector_name, kind="vacConfig")
9
8
 
@@ -12,7 +11,7 @@ def create_new_discovery_engine(vector_name):
12
11
  if "chunk_size" in chunker_config:
13
12
  chunk_size = chunker_config["chunk_size"]
14
13
 
15
- project_id = gcp_config.get('project_id') or global_config.get('project_id')
14
+ project_id = get_gcp_project()
16
15
  if not project_id:
17
16
  raise ValueError("Could not find project_id in gcp_config")
18
17
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.69.8
3
+ Version: 0.69.9
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.69.8.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.69.9.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -61,8 +61,8 @@ sunholo/database/sql/sb/delete_source_row.sql,sha256=r6fEuUKdbiLHCDGKSbKINDCpJjs
61
61
  sunholo/database/sql/sb/return_sources.sql,sha256=89KAnxfK8n_qGK9jy1OQT8f9n4uYUtYL5cCxbC2mj_c,255
62
62
  sunholo/database/sql/sb/setup.sql,sha256=CvoFvZQev2uWjmFa3aj3m3iuPFzAAJZ0S7Qi3L3-zZI,89
63
63
  sunholo/discovery_engine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
- sunholo/discovery_engine/chunker_handler.py,sha256=eqRI8R-AVIhtqpzw62glCucvX_r1MXzdrF_DAKcPhtM,4793
65
- sunholo/discovery_engine/create_new.py,sha256=31NK8ZzgKURFT2e1kBJCiyfFxfP6I_WCSbcjFpbp_fM,1144
64
+ sunholo/discovery_engine/chunker_handler.py,sha256=9zv72CxgKlKpOcSAt-XFtq0Ra-Z6tBTwMuXQhRPE5mY,4425
65
+ sunholo/discovery_engine/create_new.py,sha256=7oZG78T6lW0EspRzlo7-qRyXFSuFxDn2dfSAVEaqlqY,978
66
66
  sunholo/discovery_engine/discovery_engine_client.py,sha256=UYMhXtGWXuyyg4fA1piVjqfrWXkSP_MFimh6NzaUlZ8,12413
67
67
  sunholo/embedder/__init__.py,sha256=sI4N_CqgEVcrMDxXgxKp1FsfsB4FpjoXgPGkl4N_u4I,44
68
68
  sunholo/embedder/embed_chunk.py,sha256=P744zUQJgqrjILunzaqtTerB9AwoXFU6tXBtz4rjWgQ,6673
@@ -111,9 +111,9 @@ sunholo/vertex/__init__.py,sha256=JvHcGFuv6R_nAhY2AdoqqhMpJ5ugeWPZ_svGhWrObBk,13
111
111
  sunholo/vertex/init.py,sha256=JDMUaBRdednzbKF-5p33qqLit2LMsvgvWW-NRz0AqO0,1801
112
112
  sunholo/vertex/memory_tools.py,sha256=8F1iTWnqEK9mX4W5RzCVKIjydIcNp6OFxjn_dtQ3GXo,5379
113
113
  sunholo/vertex/safety.py,sha256=3meAX0HyGZYrH7rXPUAHxtI_3w_zoy_RX7Shtkoa660,1275
114
- sunholo-0.69.8.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
115
- sunholo-0.69.8.dist-info/METADATA,sha256=SEe57-886plXFH-T-Kkn2acgw4WlJKYqh3Ab6hJzKMQ,6155
116
- sunholo-0.69.8.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
117
- sunholo-0.69.8.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
118
- sunholo-0.69.8.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
119
- sunholo-0.69.8.dist-info/RECORD,,
114
+ sunholo-0.69.9.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
115
+ sunholo-0.69.9.dist-info/METADATA,sha256=53jro7ekONplbxTNVWi4DTYXHawjUEnEuLNPi704EwI,6155
116
+ sunholo-0.69.9.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
117
+ sunholo-0.69.9.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
118
+ sunholo-0.69.9.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
119
+ sunholo-0.69.9.dist-info/RECORD,,