sunholo 0.69.17__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.
- sunholo/chunker/data_to_embed_pubsub.py +2 -2
- sunholo/cli/chat_vac.py +5 -1
- sunholo/discovery_engine/chunker_handler.py +2 -0
- sunholo/llamaindex/import_files.py +2 -0
- sunholo/vertex/memory_tools.py +30 -21
- {sunholo-0.69.17.dist-info → sunholo-0.70.1.dist-info}/METADATA +2 -2
- {sunholo-0.69.17.dist-info → sunholo-0.70.1.dist-info}/RECORD +11 -11
- {sunholo-0.69.17.dist-info → sunholo-0.70.1.dist-info}/LICENSE.txt +0 -0
- {sunholo-0.69.17.dist-info → sunholo-0.70.1.dist-info}/WHEEL +0 -0
- {sunholo-0.69.17.dist-info → sunholo-0.70.1.dist-info}/entry_points.txt +0 -0
- {sunholo-0.69.17.dist-info → sunholo-0.70.1.dist-info}/top_level.txt +0 -0
|
@@ -60,10 +60,10 @@ def process_chunker_data(message_data, metadata, vector_name):
|
|
|
60
60
|
metadata["vector_name"] = vector_name
|
|
61
61
|
|
|
62
62
|
if message_data is None:
|
|
63
|
-
log.
|
|
63
|
+
log.warning(f"No message_data was found in data: {metadata=}")
|
|
64
64
|
return
|
|
65
65
|
|
|
66
|
-
log.debug(f"Found metadata in pubsub: {metadata}")
|
|
66
|
+
log.debug(f"Found metadata in pubsub: {metadata=}")
|
|
67
67
|
|
|
68
68
|
# checks if only a llamaindex chunking/embedder, return early as no other processing needed
|
|
69
69
|
llamacheck = llamaindex_chunker_check(message_data, metadata, vector_name)
|
sunholo/cli/chat_vac.py
CHANGED
|
@@ -211,7 +211,11 @@ def headless_mode(service_url, service_name, user_input, chat_history=None, stre
|
|
|
211
211
|
if isinstance(token, bytes):
|
|
212
212
|
token = token.decode('utf-8')
|
|
213
213
|
print(token, end='', flush=True)
|
|
214
|
-
|
|
214
|
+
if isinstance(token, dict):
|
|
215
|
+
# ?
|
|
216
|
+
pass
|
|
217
|
+
elif isinstance(token, str):
|
|
218
|
+
answer += token
|
|
215
219
|
|
|
216
220
|
if answer:
|
|
217
221
|
chat_history.append({"name": "Human", "content": user_input})
|
|
@@ -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')
|
sunholo/vertex/memory_tools.py
CHANGED
|
@@ -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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
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
|
-
|
|
85
|
-
|
|
89
|
+
try:
|
|
90
|
+
de = DiscoveryEngineClient(vector_name, project_id=get_gcp_project())
|
|
91
|
+
log.info(f"Found vectorstore {vectorstore}")
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
@@ -24,7 +24,7 @@ sunholo/bots/discord.py,sha256=cCFae5K1BCa6JVkWGLh_iZ9qFO1JpXb6K4eJrlDfEro,2442
|
|
|
24
24
|
sunholo/bots/github_webhook.py,sha256=5pQPRLM_wxxcILVaIzUDV8Kt7Arcm2dL1r1kMMHA524,9629
|
|
25
25
|
sunholo/bots/webapp.py,sha256=EIMxdAJ_xtufwJmvnn7N_Fb_1hZ9DjhJ0Kf_hp02vEU,1926
|
|
26
26
|
sunholo/chunker/__init__.py,sha256=yWYwpejyYxDpZv1joTrFMsh2SWAkd0z7a1VKtmOfMhA,77
|
|
27
|
-
sunholo/chunker/data_to_embed_pubsub.py,sha256
|
|
27
|
+
sunholo/chunker/data_to_embed_pubsub.py,sha256=-bXtm3Tn6YczUWL9kSAc6OWdD6dDY2rKhgpD-90H6ms,4203
|
|
28
28
|
sunholo/chunker/doc_handling.py,sha256=rIyknpzDyj5A0u_DqSQVD_CXLRNZPOU6TCL4bhCdjOI,8563
|
|
29
29
|
sunholo/chunker/images.py,sha256=Xmh1vwHrVhoXm5iH2dhCc52O8YgdzE8KrDSdL-pGnp8,1861
|
|
30
30
|
sunholo/chunker/loaders.py,sha256=xiToUVgPz2ZzcqpUAq7aNP3PTenb_rBUAFzu0JPycIg,10268
|
|
@@ -33,7 +33,7 @@ sunholo/chunker/pdfs.py,sha256=daCZ1xjn1YvxlifIyxskWNpLJLe-Q9D_Jq12MWx3tZo,2473
|
|
|
33
33
|
sunholo/chunker/publish.py,sha256=tiO615A2uo_ZjzdFDzNH1PL_1kJeLMUQwLJ4w67rNIc,2932
|
|
34
34
|
sunholo/chunker/splitter.py,sha256=FLkDhkePkg_zGQpFBK13Cznw575D-Rf9pcaCpc1HUxY,6726
|
|
35
35
|
sunholo/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
|
-
sunholo/cli/chat_vac.py,sha256=
|
|
36
|
+
sunholo/cli/chat_vac.py,sha256=NcXQcz0HHE0epfUPmDat5Fk8XaDrTFGs3MINQlBu1vo,18785
|
|
37
37
|
sunholo/cli/cli.py,sha256=8e00HBN6eYIUJ8cnvKteBJNn7aZPRMk4b82jwcGg9D4,3741
|
|
38
38
|
sunholo/cli/cli_init.py,sha256=JMZ9AX2cPDZ-_mv3adiv2ToFVNyRPtjk9Biszl1kiR0,2358
|
|
39
39
|
sunholo/cli/configs.py,sha256=QUM9DvKOdZmEQRM5uI3Nh887T0YDiSMr7O240zTLqws,4546
|
|
@@ -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=
|
|
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=
|
|
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=
|
|
112
|
+
sunholo/vertex/memory_tools.py,sha256=l2jNRFLjYpiNJULDZQq5b8fEEaqBQFPM4ehM9NhDHss,5718
|
|
113
113
|
sunholo/vertex/safety.py,sha256=3meAX0HyGZYrH7rXPUAHxtI_3w_zoy_RX7Shtkoa660,1275
|
|
114
|
-
sunholo-0.
|
|
115
|
-
sunholo-0.
|
|
116
|
-
sunholo-0.
|
|
117
|
-
sunholo-0.
|
|
118
|
-
sunholo-0.
|
|
119
|
-
sunholo-0.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|