sunholo 0.70.0__py3-none-any.whl → 0.70.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.
@@ -34,6 +34,8 @@ def do_discovery_engine(message_data, metadata, vector_name):
34
34
  vectorstore = value.get('vectorstore')
35
35
  if vectorstore == "discovery_engine" or vectorstore == "vertex_ai_search":
36
36
  log.info(f"Found vectorstore {vectorstore}")
37
+ if value.get('read_only'):
38
+ continue
37
39
  #location = gcp_config.get('location')
38
40
  corpus = DiscoveryEngineClient(
39
41
  data_store_id=vector_name,
@@ -64,6 +64,8 @@ def do_llamaindex(message_data, metadata, vector_name):
64
64
  vectorstore = value.get('vectorstore')
65
65
  if vectorstore == "llamaindex":
66
66
  log.info(f"Found vectorstore {vectorstore}")
67
+ if value.get('read_only'):
68
+ continue
67
69
  rag_id = value.get('rag_id')
68
70
  project_id = gcp_config.get('project_id')
69
71
  location = gcp_config.get('location')
@@ -65,34 +65,43 @@ def get_vertex_memories(vector_name):
65
65
  project_id = gcp_config.get('project_id')
66
66
  location = gcp_config.get('location')
67
67
 
68
- corpus = fetch_corpus(
69
- project_id=project_id or get_gcp_project(),
70
- location=location or global_location,
71
- rag_id=rag_id
72
- )
73
- corpus_tool = Tool.from_retrieval(
74
- retrieval=rag.Retrieval(
75
- source=rag.VertexRagStore(
76
- rag_corpora=[corpus.name], # Currently only 1 corpus is allowed.
77
- similarity_top_k=10, # Optional
78
- ),
68
+ try:
69
+ corpus = fetch_corpus(
70
+ project_id=project_id or get_gcp_project(),
71
+ location=location or global_location,
72
+ rag_id=rag_id
79
73
  )
80
- )
81
- tools.append(corpus_tool)
74
+ corpus_tool = Tool.from_retrieval(
75
+ retrieval=rag.Retrieval(
76
+ source=rag.VertexRagStore(
77
+ rag_corpora=[corpus.name], # Currently only 1 corpus is allowed.
78
+ similarity_top_k=10, # Optional
79
+ ),
80
+ )
81
+ )
82
+ tools.append(corpus_tool)
83
+ except Exception as err:
84
+ log.error(f"Failed to fetch vertex.rag: {str(err)} - skipping")
85
+ continue
86
+
82
87
  elif vectorstore == "discovery_engine" or vectorstore == "vertex_ai_search":
83
88
 
84
- de = DiscoveryEngineClient(vector_name, project_id=get_gcp_project())
85
- log.info(f"Found vectorstore {vectorstore}")
89
+ try:
90
+ de = DiscoveryEngineClient(vector_name, project_id=get_gcp_project())
91
+ log.info(f"Found vectorstore {vectorstore}")
86
92
 
87
- data_store_path = de.data_store_path()
88
- corpus_tool = Tool.from_retrieval(
89
- grounding.Retrieval(grounding.VertexAISearch(datastore=data_store_path))
90
- )
91
- tools.append(corpus_tool)
93
+ data_store_path = de.data_store_path()
94
+ corpus_tool = Tool.from_retrieval(
95
+ grounding.Retrieval(grounding.VertexAISearch(datastore=data_store_path))
96
+ )
97
+ tools.append(corpus_tool)
98
+ except Exception as err:
99
+ log.error(f"Failed to fetch DiscoveryEngine groudning - {str(err)} - skipping")
100
+ continue
92
101
 
93
102
 
94
103
  if not tools:
95
- log.warning("No llamaindex Vertex corpus configurations could be found")
104
+ log.warning("No Vertex corpus configurations could be found")
96
105
 
97
106
  return tools
98
107
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.70.0
3
+ Version: 0.70.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.70.0.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.70.1.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -61,7 +61,7 @@ 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=puNnV6vKnjNqk28FLnsIPMNsC-1Y6s20PK7ioi8qwzc,4491
64
+ sunholo/discovery_engine/chunker_handler.py,sha256=H1HHDqWMCkchJER1_oU9TOLxqf2PygiMO6CL3uKZP64,4563
65
65
  sunholo/discovery_engine/create_new.py,sha256=7oZG78T6lW0EspRzlo7-qRyXFSuFxDn2dfSAVEaqlqY,978
66
66
  sunholo/discovery_engine/discovery_engine_client.py,sha256=n4euIZjc3pWUYfoFhpvReIzHXnIYO8J9nKC8euKSTgY,14581
67
67
  sunholo/embedder/__init__.py,sha256=sI4N_CqgEVcrMDxXgxKp1FsfsB4FpjoXgPGkl4N_u4I,44
@@ -76,7 +76,7 @@ sunholo/langfuse/prompts.py,sha256=HO4Zy9usn5tKooBPCKksuw4Lff3c03Ny5wqn4ce_xZM,1
76
76
  sunholo/llamaindex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
77
  sunholo/llamaindex/generate.py,sha256=l1Picr-hVwkmAUD7XmTCa63qY9ERliFHQXwyX3BqB2Q,686
78
78
  sunholo/llamaindex/get_files.py,sha256=6rhXCDqQ_lrIapISQ_OYQDjiSATXvS_9m3qq53-oIl0,781
79
- sunholo/llamaindex/import_files.py,sha256=LIFBXxgXgRYMdVpq3FkycIoMMhLSXkKdKzK7qDuqOmQ,5566
79
+ sunholo/llamaindex/import_files.py,sha256=h5kQCNtWoMNh9Hgn_kIJvV-Vu_AwwGIvbmuNq3yQ4Rk,5638
80
80
  sunholo/lookup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
81
  sunholo/lookup/model_lookup.yaml,sha256=O7o-jP53MLA06C8pI-ILwERShO-xf6z_258wtpZBv6A,739
82
82
  sunholo/patches/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -109,11 +109,11 @@ sunholo/utils/user_ids.py,sha256=SQd5_H7FE7vcTZp9AQuQDWBXd4FEEd7TeVMQe1H4Ny8,292
109
109
  sunholo/utils/version.py,sha256=jjU_4anXBikJxPg0Wur0X-B7-ec1tC7jToykAnAG9Dg,108
110
110
  sunholo/vertex/__init__.py,sha256=JvHcGFuv6R_nAhY2AdoqqhMpJ5ugeWPZ_svGhWrObBk,136
111
111
  sunholo/vertex/init.py,sha256=RLjQppTUwubWgwf2PoAke-EtcwlVkFPaPMYvUsMw1KQ,2029
112
- sunholo/vertex/memory_tools.py,sha256=Qo6-uV0_SlwBsCEYsPnrr1l_2UH_zLT_xPxiC9XxGQg,5278
112
+ sunholo/vertex/memory_tools.py,sha256=l2jNRFLjYpiNJULDZQq5b8fEEaqBQFPM4ehM9NhDHss,5718
113
113
  sunholo/vertex/safety.py,sha256=3meAX0HyGZYrH7rXPUAHxtI_3w_zoy_RX7Shtkoa660,1275
114
- sunholo-0.70.0.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
115
- sunholo-0.70.0.dist-info/METADATA,sha256=Jc55TzM3gNp1oMX2mF6sW-55-BjYesOKO_mVa9U15y4,6240
116
- sunholo-0.70.0.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
117
- sunholo-0.70.0.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
118
- sunholo-0.70.0.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
119
- sunholo-0.70.0.dist-info/RECORD,,
114
+ sunholo-0.70.1.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
115
+ sunholo-0.70.1.dist-info/METADATA,sha256=jQEMxget9tVvjMFDj7eaY1H-ctXIOLxoqxEFXU0Fcl0,6240
116
+ sunholo-0.70.1.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
117
+ sunholo-0.70.1.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
118
+ sunholo-0.70.1.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
119
+ sunholo-0.70.1.dist-info/RECORD,,