sunholo 0.136.1__py3-none-any.whl → 0.136.2__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.
@@ -884,33 +884,6 @@ class DiscoveryEngineClient:
884
884
  except Exception as e:
885
885
  log.info(f"No results {search_request.data_store_specs=}: {str(e)}")
886
886
  return None
887
-
888
- # Apply max_limit if needed
889
- if content_search_spec_type=="documents" and max_limit is not None:
890
- # For raw response objects (when parse_chunks_to_string=False)
891
- if not parse_chunks_to_string:
892
- # We need to limit the pager results before returning
893
- limited_response = search_response
894
- # Store the original pages iterator method
895
- original_pages = limited_response.pages
896
-
897
- # Override the pages property with a custom iterator that respects max_limit
898
- def limited_pages_iterator():
899
- results_count = 0
900
- for page in original_pages:
901
- yield page
902
-
903
- # Count results in this page
904
- if hasattr(page, 'results'):
905
- results_count += len(page.results)
906
-
907
- # Stop if we've reached max_limit
908
- if results_count >= max_limit:
909
- break
910
-
911
- # Replace the pages property with our custom iterator
912
- limited_response.pages = limited_pages_iterator()
913
- return limited_response
914
887
 
915
888
  if parse_chunks_to_string:
916
889
  if content_search_spec_type=="chunks":
@@ -995,33 +968,6 @@ class DiscoveryEngineClient:
995
968
  except Exception as e:
996
969
  log.info(f"No results {search_request.data_store_specs=}: {str(e)}")
997
970
  return None
998
-
999
- # Apply max_limit if needed
1000
- if content_search_spec_type=="documents" and max_limit is not None:
1001
- # For raw response objects (when parse_chunks_to_string=False)
1002
- if not parse_chunks_to_string:
1003
- # We need to limit the pager results before returning
1004
- limited_response = search_response
1005
- # Store the original pages iterator method
1006
- original_pages = limited_response.pages
1007
-
1008
- # Override the pages property with a custom iterator that respects max_limit
1009
- async def limited_pages_iterator():
1010
- results_count = 0
1011
- async for page in original_pages:
1012
- yield page
1013
-
1014
- # Count results in this page
1015
- if hasattr(page, 'results'):
1016
- results_count += len(page.results)
1017
-
1018
- # Stop if we've reached max_limit
1019
- if results_count >= max_limit:
1020
- break
1021
-
1022
- # Replace the pages property with our custom iterator
1023
- limited_response.pages = limited_pages_iterator()
1024
- return limited_response
1025
971
 
1026
972
  if parse_chunks_to_string:
1027
973
  if content_search_spec_type=="chunks":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sunholo
3
- Version: 0.136.1
3
+ Version: 0.136.2
4
4
  Summary: AI DevOps - a package to help deploy GenAI 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=wkvXl4rFtYfN6AZUKdW9_QD49Whf77BukDbO82UwlAg,7480
76
76
  sunholo/discovery_engine/cli.py,sha256=tsKqNSDCEsDTz5-wuNwjttb3Xt35D97-KyyEiaqolMQ,35628
77
77
  sunholo/discovery_engine/create_new.py,sha256=WUi4_xh_dFaGX3xA9jkNKZhaR6LCELjMPeRb0hyj4FU,1226
78
- sunholo/discovery_engine/discovery_engine_client.py,sha256=-0vSF4vd26ihhj7_XkxZJ6TvUCJrThLxZ8lMSTe5vqs,63448
78
+ sunholo/discovery_engine/discovery_engine_client.py,sha256=f-KjBzS5ILMDWLBF-ozRynKCjxGi7Mm3rRNnynlhWtY,60822
79
79
  sunholo/discovery_engine/get_ai_search_chunks.py,sha256=I6Dt1CznqEvE7XIZ2PkLqopmjpO96iVEWJJqL5cJjOU,5554
80
80
  sunholo/embedder/__init__.py,sha256=sI4N_CqgEVcrMDxXgxKp1FsfsB4FpjoXgPGkl4N_u4I,44
81
81
  sunholo/embedder/embed_chunk.py,sha256=did2pKkWM2o0KkRcb0H9l2x_WjCq6OyuHDxGbITFKPM,6530
@@ -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.136.1.dist-info/licenses/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
172
- sunholo-0.136.1.dist-info/METADATA,sha256=2aeqbpV_AQcKkI1c_WUgZh63q6a7ZMNaAbk5C9fSzAY,10067
173
- sunholo-0.136.1.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
174
- sunholo-0.136.1.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
175
- sunholo-0.136.1.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
176
- sunholo-0.136.1.dist-info/RECORD,,
171
+ sunholo-0.136.2.dist-info/licenses/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
172
+ sunholo-0.136.2.dist-info/METADATA,sha256=3RZ3YKpfmyWWwg2yUp8ayE4a2ECu47f9Kp35IV1MjyM,10067
173
+ sunholo-0.136.2.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
174
+ sunholo-0.136.2.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
175
+ sunholo-0.136.2.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
176
+ sunholo-0.136.2.dist-info/RECORD,,