sunholo 0.79.3__py3-none-any.whl → 0.79.4__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,4 +1,4 @@
1
- from ..utils import load_config_key
1
+ from ..utils import load_config_key, ConfigManager
2
2
  from ..custom_logging import log
3
3
  from ..database.alloydb import add_document_if_not_exists
4
4
  from ..database.uuid import generate_uuid_from_object_id
@@ -109,8 +109,10 @@ def summarise_docs(docs, vector_name, summary_threshold_default=10000, model_lim
109
109
 
110
110
  if not docs:
111
111
  return None
112
+
113
+ config = ConfigManager(vector_name)
112
114
 
113
- chunker_config = load_config_key("chunker", vector_name=vector_name, kind="vacConfig")
115
+ chunker_config = config.vacConfig("chunker")
114
116
  summarise_chunking_config = chunker_config.get("summarise") if chunker_config else None
115
117
 
116
118
  if not summarise_chunking_config:
@@ -122,7 +124,7 @@ def summarise_docs(docs, vector_name, summary_threshold_default=10000, model_lim
122
124
  summary_threshold = summarise_chunking_config.get("threshold") if summarise_chunking_config.get("threshold") else summary_threshold_default
123
125
  model_limit = summarise_chunking_config.get("model_limit") if summarise_chunking_config.get("model_limit") else model_limit_default
124
126
 
125
- summary_llm = llm_str_to_llm(summary_llm_str, model=model)
127
+ summary_llm = llm_str_to_llm(summary_llm_str, model=model, config=config)
126
128
 
127
129
  doc_summaries = {}
128
130
  for doc in docs:
@@ -10,7 +10,7 @@ def dynamic_extension_call(question, config:ConfigManager, project_id:str=None,
10
10
 
11
11
  extensions = config.vacConfig('extensions')
12
12
  if not extensions:
13
- log.warning(f"No extensions founded for vac: {ConfigManager.vector_name}")
13
+ log.warning(f"No extensions founded for vac: {config.vector_name}")
14
14
 
15
15
  return None
16
16
 
@@ -66,11 +66,15 @@ def get_vertex_memories(config:ConfigManager):
66
66
 
67
67
  if rag_id:
68
68
  log.info("Using rag_id for using vectorstore: llamaindex")
69
- corpus = fetch_corpus(
70
- project_id=project_id or get_gcp_project(),
71
- location=location or global_location,
72
- rag_id=rag_id
73
- )
69
+ try:
70
+ corpus = fetch_corpus(
71
+ project_id=project_id or get_gcp_project(),
72
+ location=location or global_location,
73
+ rag_id=rag_id
74
+ )
75
+ except Exception as err:
76
+ log.error(f"Skipping - No rag found for {rag_id=} - {str(err)}")
77
+ continue
74
78
  else:
75
79
  log.info(f"Using display_name {config.vector_name} to derive rag_id")
76
80
  manager = LlamaIndexVertexCorpusManager(project_id=project_id, location=location)
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.79.3
3
+ Version: 0.79.4
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.79.3.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.79.4.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -31,7 +31,7 @@ sunholo/bots/github_webhook.py,sha256=5pQPRLM_wxxcILVaIzUDV8Kt7Arcm2dL1r1kMMHA52
31
31
  sunholo/bots/webapp.py,sha256=EIMxdAJ_xtufwJmvnn7N_Fb_1hZ9DjhJ0Kf_hp02vEU,1926
32
32
  sunholo/chunker/__init__.py,sha256=A5canS0XPgisHu0OZ7sVdILgEHGzgH9kpkDi4oBwLZk,135
33
33
  sunholo/chunker/azure.py,sha256=MVF9_-QdKUoJqlpEJ49pv2sdjMDxEiMNxzmO7w5nWDQ,3270
34
- sunholo/chunker/doc_handling.py,sha256=7NdRWIlyAdsd_xZTKrXiviRI3Jl3pQgomemLNrtdxfw,8701
34
+ sunholo/chunker/doc_handling.py,sha256=UAf9BmUMpKCKRlAMl1qNZK6xDNYWk1z3ARoftWoa_54,8734
35
35
  sunholo/chunker/encode_metadata.py,sha256=hxxd9KU35Xi0Z_EL8kt_oD66pKfBLhEjBImC16ew-Eo,1919
36
36
  sunholo/chunker/images.py,sha256=id2PBu6XyGEOtgafq2v0c9_O6kxaC_pYFMnbsIitkSg,1868
37
37
  sunholo/chunker/loaders.py,sha256=CCB0IGigNAWT__2ImVin_j83W3eGS2Qe5I6U18YQzoM,10275
@@ -125,16 +125,16 @@ sunholo/utils/timedelta.py,sha256=BbLabEx7_rbErj_YbNM0MBcaFN76DC4PTe4zD2ucezg,49
125
125
  sunholo/utils/user_ids.py,sha256=SQd5_H7FE7vcTZp9AQuQDWBXd4FEEd7TeVMQe1H4Ny8,292
126
126
  sunholo/utils/version.py,sha256=P1QAJQdZfT2cMqdTSmXmcxrD2PssMPEGM-WI6083Fck,237
127
127
  sunholo/vertex/__init__.py,sha256=tMd7ysJ1uwBjfFSn8JL0uS3-s6h_X4GAUBz8AArZEF0,339
128
- sunholo/vertex/extensions_call.py,sha256=VIVBYpJPMaDzGWxuBU5RF9GfAbrvrskGWH4eXpJbzIc,13823
128
+ sunholo/vertex/extensions_call.py,sha256=QeQbL3aAHlc4_-SynOzooZ_3xkQWAlcgNmFBSwLNtN8,13816
129
129
  sunholo/vertex/extensions_class.py,sha256=2QGW28lNjoMEnaoVb3QcqEDwphclIsZthnpLUi5_Ivo,21033
130
130
  sunholo/vertex/genai_functions.py,sha256=2z6grM9H0Z79Yzx88l8mE1wXck3bRa0TWvnqZZ9ifDc,2051
131
131
  sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
132
- sunholo/vertex/memory_tools.py,sha256=6SM9ANuG2OcgFarJNZxAXobWpWbdz0DNZ6ooMsAGfzA,7321
132
+ sunholo/vertex/memory_tools.py,sha256=pgSahVDh7GPEulu3nl-w0jb5lTClb4TCnVxPnMokNZY,7533
133
133
  sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
134
134
  sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
135
- sunholo-0.79.3.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
136
- sunholo-0.79.3.dist-info/METADATA,sha256=qN4H8g0Xe_6N39qmwrYvI25G2aYZA3x-N218wLL-yjE,7348
137
- sunholo-0.79.3.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
138
- sunholo-0.79.3.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
139
- sunholo-0.79.3.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
140
- sunholo-0.79.3.dist-info/RECORD,,
135
+ sunholo-0.79.4.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
136
+ sunholo-0.79.4.dist-info/METADATA,sha256=-mV_Y5Er002Y0OS4lEz913p-XMfqTuifDtkRMlExgA4,7348
137
+ sunholo-0.79.4.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
138
+ sunholo-0.79.4.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
139
+ sunholo-0.79.4.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
140
+ sunholo-0.79.4.dist-info/RECORD,,