sunholo 0.119.7__py3-none-any.whl → 0.119.8__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.
@@ -607,6 +607,12 @@ class DiscoveryEngineClient:
607
607
 
608
608
  return self._import_document_request(request)
609
609
 
610
+ def _create_unique_gsuri_docid(self, gcs_uri:str):
611
+ import hashlib
612
+ # Create SHA-256 hash of the URI
613
+ hash_object = hashlib.sha256(gcs_uri.encode())
614
+ # Take first 16 bytes (128 bits) and encode as hex
615
+ return hash_object.hexdigest()[:32]
610
616
 
611
617
  def import_document_with_metadata(self, gcs_uri: str, metadata: dict, branch="default_branch"):
612
618
  """
@@ -622,7 +628,7 @@ class DiscoveryEngineClient:
622
628
  """
623
629
  try:
624
630
  # 1. Generate a unique document ID
625
- document_id = str(uuid.uuid4())
631
+ document_id = self._create_unique_gsuri_docid(gcs_uri)
626
632
 
627
633
  # 2. Create a Document object
628
634
  parent = self.doc_client.branch_path(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: sunholo
3
- Version: 0.119.7
3
+ Version: 0.119.8
4
4
  Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
5
5
  Author-email: Holosun ApS <multivac@sunholo.com>
6
6
  License: Apache License, Version 2.0
@@ -75,7 +75,7 @@ sunholo/discovery_engine/__init__.py,sha256=hLgqRDJ22Aov9o2QjAEfsVgnL3kMdM-g5p8R
75
75
  sunholo/discovery_engine/chunker_handler.py,sha256=1kwVhy9hAxwXjOLpeF_Zc1uFK3uJIwB54gvTnwyjcv0,5849
76
76
  sunholo/discovery_engine/cli.py,sha256=5zebiZbrGtUnG1woAINNDF6ZF7hYM_Y6H1ekZXpCZPQ,13064
77
77
  sunholo/discovery_engine/create_new.py,sha256=WUi4_xh_dFaGX3xA9jkNKZhaR6LCELjMPeRb0hyj4FU,1226
78
- sunholo/discovery_engine/discovery_engine_client.py,sha256=PyX8CUalgqQG5H-V6KsBW7cSaPU-zmDlpFIEvGBzVPE,32753
78
+ sunholo/discovery_engine/discovery_engine_client.py,sha256=0h3h_Vy8vCcvfSBhGl8qSgVzDakOmsaPPFqHIGh3mv8,33053
79
79
  sunholo/discovery_engine/get_ai_search_chunks.py,sha256=hsFGOQugSeTMPEaQ16XTs_D45F8NABBm2IsAEdTk7kQ,4316
80
80
  sunholo/embedder/__init__.py,sha256=sI4N_CqgEVcrMDxXgxKp1FsfsB4FpjoXgPGkl4N_u4I,44
81
81
  sunholo/embedder/embed_chunk.py,sha256=did2pKkWM2o0KkRcb0H9l2x_WjCq6OyuHDxGbITFKPM,6530
@@ -166,9 +166,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
166
166
  sunholo/vertex/memory_tools.py,sha256=tBZxqVZ4InTmdBvLlOYwoSEWu4-kGquc-gxDwZCC4FA,7667
167
167
  sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
168
168
  sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
169
- sunholo-0.119.7.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
170
- sunholo-0.119.7.dist-info/METADATA,sha256=tPM66q3QUs977ICkghprD3VE9MUgOf7SBDJuVYo_IH0,9654
171
- sunholo-0.119.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
172
- sunholo-0.119.7.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
173
- sunholo-0.119.7.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
174
- sunholo-0.119.7.dist-info/RECORD,,
169
+ sunholo-0.119.8.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
170
+ sunholo-0.119.8.dist-info/METADATA,sha256=DloFugwdklernCmQ9JPzVBA52N2b6WyK9uWEQfeodQI,9654
171
+ sunholo-0.119.8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
172
+ sunholo-0.119.8.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
173
+ sunholo-0.119.8.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
174
+ sunholo-0.119.8.dist-info/RECORD,,