sunholo 0.71.4__py3-none-any.whl → 0.71.6__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.
- sunholo/components/retriever.py +5 -2
- sunholo/llamaindex/import_files.py +1 -1
- sunholo/logging.py +4 -0
- sunholo/utils/version.py +7 -2
- sunholo/vertex/__init__.py +1 -1
- sunholo/vertex/memory_tools.py +11 -0
- {sunholo-0.71.4.dist-info → sunholo-0.71.6.dist-info}/METADATA +2 -2
- {sunholo-0.71.4.dist-info → sunholo-0.71.6.dist-info}/RECORD +12 -12
- {sunholo-0.71.4.dist-info → sunholo-0.71.6.dist-info}/LICENSE.txt +0 -0
- {sunholo-0.71.4.dist-info → sunholo-0.71.6.dist-info}/WHEEL +0 -0
- {sunholo-0.71.4.dist-info → sunholo-0.71.6.dist-info}/entry_points.txt +0 -0
- {sunholo-0.71.4.dist-info → sunholo-0.71.6.dist-info}/top_level.txt +0 -0
sunholo/components/retriever.py
CHANGED
|
@@ -64,8 +64,11 @@ def pick_retriever(vector_name, embeddings=None):
|
|
|
64
64
|
continue
|
|
65
65
|
|
|
66
66
|
k_override = value.get('k', 3)
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
if vectorstore:
|
|
68
|
+
vs_retriever = vectorstore.as_retriever(search_kwargs=dict(k=k_override))
|
|
69
|
+
retriever_list.append(vs_retriever)
|
|
70
|
+
else:
|
|
71
|
+
log.warning(f"No vectorstore found despite being in config: {key=}")
|
|
69
72
|
|
|
70
73
|
if value.get('provider') == "GoogleCloudEnterpriseSearchRetriever":
|
|
71
74
|
log.info(f"Found GoogleCloudEnterpriseSearchRetriever {value['provider']}")
|
|
@@ -81,7 +81,7 @@ def do_llamaindex(message_data, metadata, vector_name):
|
|
|
81
81
|
|
|
82
82
|
corpuses.append(corpus)
|
|
83
83
|
if not corpuses:
|
|
84
|
-
log.
|
|
84
|
+
log.warning("Could not find a Vertex Llamaindex RAG corpus to import data to despite being in config")
|
|
85
85
|
return None
|
|
86
86
|
|
|
87
87
|
try:
|
sunholo/logging.py
CHANGED
|
@@ -101,6 +101,10 @@ class GoogleCloudLogging:
|
|
|
101
101
|
severity (str, optional): The severity level of the log entry. Defaults to "INFO".
|
|
102
102
|
"""
|
|
103
103
|
|
|
104
|
+
from .utils.version import sunholo_version
|
|
105
|
+
|
|
106
|
+
log_text = f"[{sunholo_version()}] {log_text}"
|
|
107
|
+
|
|
104
108
|
if not logger_name and not self.logger_name:
|
|
105
109
|
raise ValueError("Must provide a logger name e.g. 'run.googleapis.com%2Fstderr'")
|
|
106
110
|
|
sunholo/utils/version.py
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
_cached_version = None
|
|
2
|
+
|
|
1
3
|
def sunholo_version():
|
|
2
|
-
|
|
3
|
-
|
|
4
|
+
global _cached_version
|
|
5
|
+
if _cached_version is None:
|
|
6
|
+
from importlib.metadata import version
|
|
7
|
+
_cached_version = f"sunholo-{version('sunholo')}"
|
|
8
|
+
return _cached_version
|
sunholo/vertex/__init__.py
CHANGED
sunholo/vertex/memory_tools.py
CHANGED
|
@@ -106,6 +106,17 @@ def get_vertex_memories(vector_name):
|
|
|
106
106
|
|
|
107
107
|
return tools
|
|
108
108
|
|
|
109
|
+
def get_google_search_grounding(vector_name):
|
|
110
|
+
# can't have this and llamaindex memories?
|
|
111
|
+
ground = load_config_key("grounding", vector_name=vector_name, kind="vacConfig")
|
|
112
|
+
if ground and ground.get("google_search"):
|
|
113
|
+
gs_tool = Tool.from_google_search_retrieval(grounding.GoogleSearchRetrieval())
|
|
114
|
+
log.info(f"Got Search Tool: {gs_tool}")
|
|
115
|
+
return gs_tool
|
|
116
|
+
|
|
117
|
+
log.info(f"No google search config available for {vector_name}")
|
|
118
|
+
return None
|
|
119
|
+
|
|
109
120
|
def print_grounding_response(response):
|
|
110
121
|
"""Prints Gemini response with grounding citations."""
|
|
111
122
|
grounding_metadata = response.candidates[0].grounding_metadata
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.71.
|
|
3
|
+
Version: 0.71.6
|
|
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.71.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.71.6.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sunholo/__init__.py,sha256=0CdpufyRKWyZe7J7UKigL6j_qOorM-p0OjHIAuf9M38,864
|
|
2
|
-
sunholo/logging.py,sha256=
|
|
2
|
+
sunholo/logging.py,sha256=YfIN1oP3dOEkkYkyRBU8BGS3uJFGwUDsFCl8mIVbwvE,12225
|
|
3
3
|
sunholo/agents/__init__.py,sha256=Hb4NXy2rN-83Z0-UDRwX-LXv2R29lcbSFPf8G6q4fZg,380
|
|
4
4
|
sunholo/agents/chat_history.py,sha256=8iX1bgvRW6fdp6r_DQR_caPHYrZ_9QJJgPxCiSDf3q8,5380
|
|
5
5
|
sunholo/agents/dispatch_to_qa.py,sha256=nFNdxhkr7rVYuUwVoBCBNYBI2Dke6-_z_ZApBEWb_cU,8291
|
|
@@ -45,7 +45,7 @@ sunholo/cli/sun_rich.py,sha256=UpMqeJ0C8i0pkue1AHnnyyX0bFJ9zZeJ7HBR6yhuA8A,54
|
|
|
45
45
|
sunholo/cli/swagger.py,sha256=absYKAU-7Yd2eiVNUY-g_WLl2zJfeRUNdWQ0oH8M_HM,1564
|
|
46
46
|
sunholo/components/__init__.py,sha256=IDoylb74zFKo6NIS3RQqUl0PDFBGVxM1dfUmO7OJ44U,176
|
|
47
47
|
sunholo/components/llm.py,sha256=T4we3tGmqUj4tPwxQr9M6AXv_BALqZV_dRSvINan-oU,10374
|
|
48
|
-
sunholo/components/retriever.py,sha256=
|
|
48
|
+
sunholo/components/retriever.py,sha256=szXyQ-cgFOw6uokl7ajQt9AGXC0N2nLB900TVtjNRa4,6528
|
|
49
49
|
sunholo/components/vectorstore.py,sha256=zUJ90L1S4IyxLB0JUWopeuwVjcsSqdhj1QreEfsJhsE,5548
|
|
50
50
|
sunholo/database/__init__.py,sha256=Zz0Shcq-CtStf9rJGIYB_Ybzb8rY_Q9mfSj-nviM490,241
|
|
51
51
|
sunholo/database/alloydb.py,sha256=d9W0pbZB0jTVIGF5OVaQ6kXHo-X3-6e9NpWNmV5e9UY,10464
|
|
@@ -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=
|
|
79
|
+
sunholo/llamaindex/import_files.py,sha256=DmBS4tTSZW39FhKGff0qjMTP07VO7xl-LaQuxQYoc8M,5888
|
|
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
|
|
@@ -106,16 +106,16 @@ sunholo/utils/gcp_project.py,sha256=0ozs6tzI4qEvEeXb8MxLnCdEVoWKxlM6OH05htj7_tc,
|
|
|
106
106
|
sunholo/utils/parsers.py,sha256=z98cQ1v2_ScnqHxCtApNeAN2the8MdvS6RpKL6vWyOU,5287
|
|
107
107
|
sunholo/utils/timedelta.py,sha256=BbLabEx7_rbErj_YbNM0MBcaFN76DC4PTe4zD2ucezg,493
|
|
108
108
|
sunholo/utils/user_ids.py,sha256=SQd5_H7FE7vcTZp9AQuQDWBXd4FEEd7TeVMQe1H4Ny8,292
|
|
109
|
-
sunholo/utils/version.py,sha256=
|
|
110
|
-
sunholo/vertex/__init__.py,sha256=
|
|
109
|
+
sunholo/utils/version.py,sha256=P1QAJQdZfT2cMqdTSmXmcxrD2PssMPEGM-WI6083Fck,237
|
|
110
|
+
sunholo/vertex/__init__.py,sha256=dZa4xWYo-KU6br7SHZJPzfB4T6ICGkw_FshDs1tvnCA,165
|
|
111
111
|
sunholo/vertex/extensions.py,sha256=d-Ikt9gHFf-jUMPmyU-xHwYe22QtEyr90Ua1LDKgTws,11026
|
|
112
112
|
sunholo/vertex/extensions_class.py,sha256=0-XMrMvfhMN380ZdGXl11Mt7R9kCu9rB4Vduiflk8QA,9202
|
|
113
113
|
sunholo/vertex/init.py,sha256=RLjQppTUwubWgwf2PoAke-EtcwlVkFPaPMYvUsMw1KQ,2029
|
|
114
|
-
sunholo/vertex/memory_tools.py,sha256=
|
|
114
|
+
sunholo/vertex/memory_tools.py,sha256=sipBI7TFttbYzobSWS_1TzWFVTPnJckz3NvLVbTepMc,6345
|
|
115
115
|
sunholo/vertex/safety.py,sha256=3meAX0HyGZYrH7rXPUAHxtI_3w_zoy_RX7Shtkoa660,1275
|
|
116
|
-
sunholo-0.71.
|
|
117
|
-
sunholo-0.71.
|
|
118
|
-
sunholo-0.71.
|
|
119
|
-
sunholo-0.71.
|
|
120
|
-
sunholo-0.71.
|
|
121
|
-
sunholo-0.71.
|
|
116
|
+
sunholo-0.71.6.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
|
|
117
|
+
sunholo-0.71.6.dist-info/METADATA,sha256=mF32bponOP0fNr7dvWPiIWOAlTf1-csaIxTIy_oSBDA,6613
|
|
118
|
+
sunholo-0.71.6.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
|
|
119
|
+
sunholo-0.71.6.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
|
|
120
|
+
sunholo-0.71.6.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
|
|
121
|
+
sunholo-0.71.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|