sunholo 0.131.4__py3-none-any.whl → 0.131.5__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/cli.py +25 -11
- {sunholo-0.131.4.dist-info → sunholo-0.131.5.dist-info}/METADATA +1 -1
- {sunholo-0.131.4.dist-info → sunholo-0.131.5.dist-info}/RECORD +7 -7
- {sunholo-0.131.4.dist-info → sunholo-0.131.5.dist-info}/WHEEL +0 -0
- {sunholo-0.131.4.dist-info → sunholo-0.131.5.dist-info}/entry_points.txt +0 -0
- {sunholo-0.131.4.dist-info → sunholo-0.131.5.dist-info}/licenses/LICENSE.txt +0 -0
- {sunholo-0.131.4.dist-info → sunholo-0.131.5.dist-info}/top_level.txt +0 -0
sunholo/discovery_engine/cli.py
CHANGED
@@ -342,17 +342,31 @@ def search_engine_command(args):
|
|
342
342
|
console.print("\n[bold green]Search Summary:[/bold green]")
|
343
343
|
console.print(page.summary.summary_text)
|
344
344
|
if args.include_citations and hasattr(page.summary, 'summary_with_metadata') and page.summary.summary_with_metadata:
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
345
|
+
citation_metadata = page.summary.summary_with_metadata.citation_metadata
|
346
|
+
if citation_metadata and hasattr(citation_metadata, 'citations'):
|
347
|
+
# Get the actual list of Citation objects
|
348
|
+
citation_list = citation_metadata.citations
|
349
|
+
console.print("[bold cyan]Citations:[/bold cyan]")
|
350
|
+
for i, citation in enumerate(citation_list):
|
351
|
+
# citation is now a Citation object with start_index, end_index, sources
|
352
|
+
source_details = []
|
353
|
+
# Check if the citation has sources and iterate through them
|
354
|
+
if hasattr(citation, 'sources') and citation.sources:
|
355
|
+
for source in citation.sources:
|
356
|
+
# source is a CitationSource object with reference_index
|
357
|
+
ref_idx = getattr(source, 'reference_index', 'N/A')
|
358
|
+
source_details.append(f"RefIdx:{ref_idx}") # Append details of each source
|
359
|
+
|
360
|
+
source_info = ", ".join(source_details) if source_details else "No Source Info"
|
361
|
+
start_idx = getattr(citation, 'start_index', 'N/A')
|
362
|
+
end_idx = getattr(citation, 'end_index', 'N/A')
|
363
|
+
console.print(f" Citation {i+1}: Segment [{start_idx}-{end_idx}], Sources [{source_info}]")
|
364
|
+
|
365
|
+
references = page.summary.summary_with_metadata.references
|
366
|
+
if references:
|
367
|
+
console.print("[bold cyan]References:[/bold cyan]")
|
368
|
+
for ref in references:
|
369
|
+
console.print(f" - Title: {getattr(ref, 'title', 'N/A')}, URI: {getattr(ref, 'uri', 'N/A')}") # Adjust based on actual reference structure
|
356
370
|
|
357
371
|
console.print("-" * 20)
|
358
372
|
|
@@ -73,7 +73,7 @@ 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
|
76
|
+
sunholo/discovery_engine/cli.py,sha256=-ERTG9jxt6bEMkCfXRYCrCxTth_Y2XhS3TkK1t-W_f8,31462
|
77
77
|
sunholo/discovery_engine/create_new.py,sha256=WUi4_xh_dFaGX3xA9jkNKZhaR6LCELjMPeRb0hyj4FU,1226
|
78
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
|
@@ -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.
|
172
|
-
sunholo-0.131.
|
173
|
-
sunholo-0.131.
|
174
|
-
sunholo-0.131.
|
175
|
-
sunholo-0.131.
|
176
|
-
sunholo-0.131.
|
171
|
+
sunholo-0.131.5.dist-info/licenses/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
|
172
|
+
sunholo-0.131.5.dist-info/METADATA,sha256=hRtqYxbxEn06q1a3HM2nOIhYC2ugJ5Z7G4zm4YfHaCw,10067
|
173
|
+
sunholo-0.131.5.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
|
174
|
+
sunholo-0.131.5.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
|
175
|
+
sunholo-0.131.5.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
|
176
|
+
sunholo-0.131.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|