sunholo 0.131.2__py3-none-any.whl → 0.131.4__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.
@@ -7,6 +7,8 @@ import traceback # For detailed error logging
7
7
  try:
8
8
  # Assuming sun_rich is in your project structure relative to this file
9
9
  from ..cli.sun_rich import console
10
+ from google.protobuf.json_format import MessageToDict
11
+
10
12
  except ImportError:
11
13
  # Fallback if rich is not available or path is wrong
12
14
  class ConsoleFallback:
@@ -340,11 +342,11 @@ def search_engine_command(args):
340
342
  console.print("\n[bold green]Search Summary:[/bold green]")
341
343
  console.print(page.summary.summary_text)
342
344
  if args.include_citations and hasattr(page.summary, 'summary_with_metadata') and page.summary.summary_with_metadata:
343
- citations = page.summary.summary_with_metadata.citations
344
- if citations:
345
+ citation_metadata = page.summary.summary_with_metadata.citation_metadata
346
+ if citation_metadata:
345
347
  console.print("[bold cyan]Citations:[/bold cyan]")
346
- for i, citation in enumerate(citations):
347
- source_info = ", ".join([f"'{s.citation_source}'" for s in citation.sources]) if citation.sources else "N/A"
348
+ for i, citation in enumerate(citation_metadata):
349
+ source_info = ", ".join([f"'{s.reference_index}'" for s in citation.sources]) if citation.sources else "N/A"
348
350
  console.print(f" [{i+1}] Sources: {source_info}")
349
351
  references = page.summary.summary_with_metadata.references
350
352
  if references:
@@ -369,9 +371,10 @@ def search_engine_command(args):
369
371
  if doc.struct_data:
370
372
  try:
371
373
  # Convert Struct to dict for nice printing
372
- struct_dict = dict(doc.struct_data)
374
+ struct_dict = MessageToDict(doc.struct_data._pb)
373
375
  console.print(f" Metadata: {json.dumps(struct_dict, indent=2)}")
374
- except Exception:
376
+ except Exception as json_err:
377
+ console.print(f"[yellow] Warning: Could not convert metadata Struct to JSON: {json_err}[/yellow]")
375
378
  console.print(f" Metadata: {doc.struct_data}") # Fallback
376
379
 
377
380
  # Display Snippets if requested and available
@@ -881,7 +881,6 @@ class DiscoveryEngineClient:
881
881
  boost_spec: Optional["discoveryengine.SearchRequest.BoostSpec"] = None, # Okay if default is None # type: ignore
882
882
  params: Optional[Dict[str, Any]] = None,
883
883
  user_pseudo_id: Optional[str] = None,
884
- custom_fine_tuning_spec: Optional["discoveryengine.SearchRequest.CustomFineTuningSpec"] = None, # Okay if default is None # type: ignore
885
884
  collection_id: str = "default_collection" # Needed for engine path
886
885
  ):
887
886
  """
@@ -1027,7 +1026,6 @@ class DiscoveryEngineClient:
1027
1026
  boost_spec=boost_spec,
1028
1027
  params=params,
1029
1028
  user_pseudo_id=user_pseudo_id,
1030
- custom_fine_tuning_spec=custom_fine_tuning_spec,
1031
1029
  # Add other relevant fields like facet_specs if needed
1032
1030
  )
1033
1031
 
@@ -1065,7 +1063,6 @@ class DiscoveryEngineClient:
1065
1063
  boost_spec: Optional["discoveryengine.SearchRequest.BoostSpec"] = None, # Okay if default is None # type: ignore
1066
1064
  params: Optional[Dict[str, Any]] = None,
1067
1065
  user_pseudo_id: Optional[str] = None,
1068
- custom_fine_tuning_spec: Optional["discoveryengine.SearchRequest.CustomFineTuningSpec"] = None, # Okay if default is None # type: ignore
1069
1066
  collection_id: str = "default_collection"
1070
1067
  ):
1071
1068
  """
@@ -1139,7 +1136,6 @@ class DiscoveryEngineClient:
1139
1136
  boost_spec=boost_spec,
1140
1137
  params=params,
1141
1138
  user_pseudo_id=user_pseudo_id,
1142
- custom_fine_tuning_spec=custom_fine_tuning_spec,
1143
1139
  )
1144
1140
 
1145
1141
  log.info(f"Async searching engine '{engine_id}' with request: {request}")
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sunholo
3
- Version: 0.131.2
4
- Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
3
+ Version: 0.131.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
7
7
  Project-URL: Homepage, https://github.com/sunholo-data/sunholo-py
@@ -73,9 +73,9 @@ sunholo/database/sql/sb/return_sources.sql,sha256=89KAnxfK8n_qGK9jy1OQT8f9n4uYUt
73
73
  sunholo/database/sql/sb/setup.sql,sha256=CvoFvZQev2uWjmFa3aj3m3iuPFzAAJZ0S7Qi3L3-zZI,89
74
74
  sunholo/discovery_engine/__init__.py,sha256=hLgqRDJ22Aov9o2QjAEfsVgnL3kMdM-g5p8RJ9OyKdQ,130
75
75
  sunholo/discovery_engine/chunker_handler.py,sha256=wkvXl4rFtYfN6AZUKdW9_QD49Whf77BukDbO82UwlAg,7480
76
- sunholo/discovery_engine/cli.py,sha256=FegPb2BgD6Dg_K4SI6E6zxbQFcHJyyU7V6lH6axK5iU,30107
76
+ sunholo/discovery_engine/cli.py,sha256=QLmFDWaNPpgzBN9qDmn3kl5yTepebZNzvwwvusP57-Q,30362
77
77
  sunholo/discovery_engine/create_new.py,sha256=WUi4_xh_dFaGX3xA9jkNKZhaR6LCELjMPeRb0hyj4FU,1226
78
- sunholo/discovery_engine/discovery_engine_client.py,sha256=-Q6RjzMcHruXjg_WsCaqNuytHmlI4Ds3uYre9HhJduk,52195
78
+ sunholo/discovery_engine/discovery_engine_client.py,sha256=nV4loBBnOqGPRlEbFIFRJEB6cXKDVgJOMRMdf4-v510,51775
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.131.2.dist-info/licenses/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
172
- sunholo-0.131.2.dist-info/METADATA,sha256=ZUbMnOZD_qeGDP10xyZaMxhHwv9w7AxCN7K89_50tB0,10084
173
- sunholo-0.131.2.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
174
- sunholo-0.131.2.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
175
- sunholo-0.131.2.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
176
- sunholo-0.131.2.dist-info/RECORD,,
171
+ sunholo-0.131.4.dist-info/licenses/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
172
+ sunholo-0.131.4.dist-info/METADATA,sha256=5jb5Aw2UIaAiccheUvuGWwNPgWsK3jVFch7bBjnSiaA,10067
173
+ sunholo-0.131.4.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
174
+ sunholo-0.131.4.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
175
+ sunholo-0.131.4.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
176
+ sunholo-0.131.4.dist-info/RECORD,,