sunholo 0.126.1__py3-none-any.whl → 0.126.3__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/discovery_engine/chunker_handler.py +14 -6
- {sunholo-0.126.1.dist-info → sunholo-0.126.3.dist-info}/METADATA +1 -1
- {sunholo-0.126.1.dist-info → sunholo-0.126.3.dist-info}/RECORD +7 -7
- {sunholo-0.126.1.dist-info → sunholo-0.126.3.dist-info}/WHEEL +0 -0
- {sunholo-0.126.1.dist-info → sunholo-0.126.3.dist-info}/entry_points.txt +0 -0
- {sunholo-0.126.1.dist-info → sunholo-0.126.3.dist-info}/licenses/LICENSE.txt +0 -0
- {sunholo-0.126.1.dist-info → sunholo-0.126.3.dist-info}/top_level.txt +0 -0
@@ -6,6 +6,7 @@ from ..components import load_memories
|
|
6
6
|
from .discovery_engine_client import DiscoveryEngineClient
|
7
7
|
from .create_new import create_new_discovery_engine
|
8
8
|
from ..embedder.embed_metadata import audit_metadata
|
9
|
+
import traceback
|
9
10
|
|
10
11
|
def do_discovery_engine(message_data:str, metadata:dict, config:ConfigManager=None):
|
11
12
|
"""
|
@@ -79,7 +80,7 @@ def do_discovery_engine(message_data:str, metadata:dict, config:ConfigManager=No
|
|
79
80
|
else:
|
80
81
|
log.warning(f"Could not import {message_data} got not response")
|
81
82
|
except Exception as err:
|
82
|
-
log.error(f"Error importing {message_data} - {corp=} - {str(err)}")
|
83
|
+
log.error(f"Error importing {message_data} - {corp=} - {str(err)} {traceback.format_exc()}")
|
83
84
|
|
84
85
|
if str(err).startswith("404"):
|
85
86
|
log.info(f"Attempting to create a new DiscoveryEngine corpus: {config.vector_name}")
|
@@ -94,8 +95,8 @@ def do_discovery_engine(message_data:str, metadata:dict, config:ConfigManager=No
|
|
94
95
|
gcs_uri=message_data,
|
95
96
|
metadata=metadata
|
96
97
|
)
|
97
|
-
|
98
|
-
|
98
|
+
else:
|
99
|
+
raise Exception(f"Error importing {message_data} - {corp=} - {str(err)}")
|
99
100
|
|
100
101
|
metadata["source"] = message_data
|
101
102
|
return metadata
|
@@ -149,15 +150,22 @@ def discovery_engine_chunker_check(message_data,
|
|
149
150
|
total_memories = len(check_write_memories(config))
|
150
151
|
total_discovery_memories = check_discovery_engine_in_memory(config)
|
151
152
|
|
153
|
+
log.debug(f"{memories=} {total_memories=} {total_discovery_memories=}")
|
152
154
|
if not process and total_memories == total_discovery_memories:
|
153
155
|
log.info(f"Do not process discovery engine, and only memory found is discovery engine for {metadata} - stopping")
|
154
156
|
|
155
157
|
return metadata
|
156
158
|
|
157
159
|
if total_discovery_memories > 0:
|
158
|
-
|
159
|
-
|
160
|
-
|
160
|
+
try:
|
161
|
+
log.info(f"Process discovery engine for {metadata}")
|
162
|
+
disc_meta = do_discovery_engine(message_data, metadata, config=config)
|
163
|
+
log.info(f"Processed discovery engine: {disc_meta}")
|
164
|
+
except Exception as err:
|
165
|
+
log.error(f"Error processing discovery engine: {str(err)} {traceback.format_exc()}")
|
166
|
+
disc_meta = None
|
167
|
+
|
168
|
+
return disc_meta
|
161
169
|
|
162
170
|
# If discovery engine is the only entry, return
|
163
171
|
if total_discovery_memories == total_memories:
|
@@ -72,7 +72,7 @@ sunholo/database/sql/sb/delete_source_row.sql,sha256=r6fEuUKdbiLHCDGKSbKINDCpJjs
|
|
72
72
|
sunholo/database/sql/sb/return_sources.sql,sha256=89KAnxfK8n_qGK9jy1OQT8f9n4uYUtYL5cCxbC2mj_c,255
|
73
73
|
sunholo/database/sql/sb/setup.sql,sha256=CvoFvZQev2uWjmFa3aj3m3iuPFzAAJZ0S7Qi3L3-zZI,89
|
74
74
|
sunholo/discovery_engine/__init__.py,sha256=hLgqRDJ22Aov9o2QjAEfsVgnL3kMdM-g5p8RJ9OyKdQ,130
|
75
|
-
sunholo/discovery_engine/chunker_handler.py,sha256=
|
75
|
+
sunholo/discovery_engine/chunker_handler.py,sha256=3KL33prRvN_fwaiZpOIXzxpKFUJdJiPQRZzhxYqunj0,7065
|
76
76
|
sunholo/discovery_engine/cli.py,sha256=KGVle5rkLL49oF9TQhrGI--8017IvvLOEoYur545Qb0,12790
|
77
77
|
sunholo/discovery_engine/create_new.py,sha256=WUi4_xh_dFaGX3xA9jkNKZhaR6LCELjMPeRb0hyj4FU,1226
|
78
78
|
sunholo/discovery_engine/discovery_engine_client.py,sha256=NjIcP10I2-8yj6QZKrxGzNbh3SqQ5vGYsq9OwxCpWas,36935
|
@@ -168,9 +168,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
|
|
168
168
|
sunholo/vertex/memory_tools.py,sha256=tBZxqVZ4InTmdBvLlOYwoSEWu4-kGquc-gxDwZCC4FA,7667
|
169
169
|
sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
|
170
170
|
sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
|
171
|
-
sunholo-0.126.
|
172
|
-
sunholo-0.126.
|
173
|
-
sunholo-0.126.
|
174
|
-
sunholo-0.126.
|
175
|
-
sunholo-0.126.
|
176
|
-
sunholo-0.126.
|
171
|
+
sunholo-0.126.3.dist-info/licenses/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
|
172
|
+
sunholo-0.126.3.dist-info/METADATA,sha256=_ekEbwlgG0P-PXQWNNfe9JnJDNDU_zXQ7ehPUNZprTM,10001
|
173
|
+
sunholo-0.126.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
174
|
+
sunholo-0.126.3.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
|
175
|
+
sunholo-0.126.3.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
|
176
|
+
sunholo-0.126.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|