sunholo 0.62.16__tar.gz → 0.62.18__tar.gz
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-0.62.16 → sunholo-0.62.18}/PKG-INFO +2 -2
- {sunholo-0.62.16 → sunholo-0.62.18}/setup.py +1 -1
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/cli/chat_vac.py +10 -1
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/cli/embedder.py +16 -7
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/cli/run_proxy.py +1 -1
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo.egg-info/PKG-INFO +2 -2
- {sunholo-0.62.16 → sunholo-0.62.18}/LICENSE.txt +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/MANIFEST.in +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/README.md +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/setup.cfg +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/chat_history.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/dispatch_to_qa.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/fastapi/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/fastapi/base.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/fastapi/qna_routes.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/flask/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/flask/base.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/flask/qna_routes.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/langserve.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/pubsub.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/route.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/agents/special_commands.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/archive/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/archive/archive.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/auth/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/auth/run.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/bots/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/bots/discord.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/bots/github_webhook.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/bots/webapp.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/chunker/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/chunker/data_to_embed_pubsub.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/chunker/doc_handling.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/chunker/images.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/chunker/loaders.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/chunker/message_data.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/chunker/pdfs.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/chunker/publish.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/chunker/splitter.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/cli/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/cli/cli.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/cli/cli_init.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/cli/configs.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/cli/deploy.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/cli/merge_texts.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/cli/sun_rich.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/components/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/components/llm.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/components/retriever.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/components/vectorstore.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/alloydb.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/database.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/lancedb.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/sql/sb/create_function.sql +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/sql/sb/create_function_time.sql +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/sql/sb/create_table.sql +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/sql/sb/delete_source_row.sql +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/sql/sb/return_sources.sql +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/sql/sb/setup.sql +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/static_dbs.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/database/uuid.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/embedder/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/embedder/embed_chunk.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/gcs/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/gcs/add_file.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/gcs/download_url.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/gcs/metadata.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/langfuse/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/langfuse/callback.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/langfuse/prompts.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/llamaindex/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/llamaindex/generate.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/llamaindex/get_files.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/llamaindex/import_files.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/logging.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/lookup/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/lookup/model_lookup.yaml +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/patches/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/patches/langchain/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/patches/langchain/lancedb.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/patches/langchain/vertexai.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/pubsub/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/pubsub/process_pubsub.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/pubsub/pubsub_manager.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/qna/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/qna/parsers.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/qna/retry.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/streaming/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/streaming/content_buffer.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/streaming/langserve.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/streaming/stream_lookup.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/streaming/streaming.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/summarise/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/summarise/summarise.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/utils/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/utils/big_context.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/utils/config.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/utils/config_schema.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/utils/gcp.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/utils/gcp_project.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/utils/parsers.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/utils/timedelta.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/utils/user_ids.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/vertex/__init__.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/vertex/init.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/vertex/memory_tools.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo/vertex/safety.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo.egg-info/SOURCES.txt +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo.egg-info/dependency_links.txt +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo.egg-info/entry_points.txt +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo.egg-info/requires.txt +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/sunholo.egg-info/top_level.txt +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/tests/test_chat_history.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/tests/test_config.py +0 -0
- {sunholo-0.62.16 → sunholo-0.62.18}/tests/test_dispatch_to_qa.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.62.
|
|
3
|
+
Version: 0.62.18
|
|
4
4
|
Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
|
|
5
5
|
Home-page: https://github.com/sunholo-data/sunholo-py
|
|
6
|
-
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.62.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.62.18.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -273,6 +273,7 @@ def vac_command(args):
|
|
|
273
273
|
def invoke_vac(service_url, data, vector_name=None, metadata=None, is_file=False):
|
|
274
274
|
try:
|
|
275
275
|
if is_file:
|
|
276
|
+
console.print("Uploading file to chunker...")
|
|
276
277
|
# Handle file upload
|
|
277
278
|
if not isinstance(data, Path) or not data.is_file():
|
|
278
279
|
raise ValueError("For file uploads, 'data' must be a Path object pointing to a valid file.")
|
|
@@ -287,12 +288,20 @@ def invoke_vac(service_url, data, vector_name=None, metadata=None, is_file=False
|
|
|
287
288
|
|
|
288
289
|
response = requests.post(service_url, files=files, data=form_data)
|
|
289
290
|
else:
|
|
291
|
+
console.print("Uploading JSON to chunker...")
|
|
290
292
|
try:
|
|
291
|
-
|
|
293
|
+
if isinstance(data, dict):
|
|
294
|
+
json_data = data
|
|
295
|
+
else:
|
|
296
|
+
json_data = json.loads(data)
|
|
292
297
|
except json.JSONDecodeError as err:
|
|
293
298
|
console.print(f"[bold red]ERROR: invalid JSON: {str(err)} [/bold red]")
|
|
294
299
|
sys.exit(1)
|
|
300
|
+
except Exception as err:
|
|
301
|
+
console.print(f"[bold red]ERROR: could not parse JSON: {str(err)} [/bold red]")
|
|
302
|
+
sys.exit(1)
|
|
295
303
|
|
|
304
|
+
log.debug(f"Sending data: {data} or json_data: {json.dumps(json_data)}")
|
|
296
305
|
# Handle JSON data
|
|
297
306
|
headers = {"Content-Type": "application/json"}
|
|
298
307
|
response = requests.post(service_url, headers=headers, data=json.dumps(json_data))
|
|
@@ -18,12 +18,15 @@ def create_metadata(vac, metadata):
|
|
|
18
18
|
# Default metadata if none provided
|
|
19
19
|
default_metadata = {"vector_name": vac, "source": "sunholo-cli", "eventTime": formatted_time}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
try:
|
|
22
|
+
# Merge default metadata with provided metadata
|
|
23
|
+
if metadata:
|
|
24
|
+
if not isinstance(metadata, dict):
|
|
25
|
+
metadata = json.loads(metadata)
|
|
26
|
+
else:
|
|
27
|
+
metadata = {}
|
|
28
|
+
except Exception as err:
|
|
29
|
+
console.print(f"[bold red]ERROR: metadata not parsed: {err} for {metadata}")
|
|
27
30
|
|
|
28
31
|
# Update metadata with default values if not present
|
|
29
32
|
metadata.update(default_metadata)
|
|
@@ -87,7 +90,7 @@ def embed_command(args):
|
|
|
87
90
|
chunk_args = Namespace(**chunk_args)
|
|
88
91
|
chunk_url = resolve_service_url(chunk_args, no_config=True)
|
|
89
92
|
|
|
90
|
-
with console.status(f"[bold orange]Sending {args.data} to chunk via {chunk_url}[/bold orange]", spinner="star"):
|
|
93
|
+
with console.status(f"[bold orange]Sending '{args.data}' to chunk via {chunk_url}[/bold orange]", spinner="star"):
|
|
91
94
|
if args.is_file:
|
|
92
95
|
|
|
93
96
|
metadata = create_metadata(args.vac_name, args.metadata)
|
|
@@ -102,6 +105,7 @@ def embed_command(args):
|
|
|
102
105
|
|
|
103
106
|
else:
|
|
104
107
|
json_data = encode_data(args.vac_name, args.data, args.metadata, args.local_chunks)
|
|
108
|
+
console.print(f"Chunk JSON data: {json_data}")
|
|
105
109
|
chunk_res = invoke_vac(f"{chunk_url}/pubsub_to_store", json_data)
|
|
106
110
|
|
|
107
111
|
stop_proxy("chunker")
|
|
@@ -113,6 +117,11 @@ def embed_command(args):
|
|
|
113
117
|
|
|
114
118
|
return
|
|
115
119
|
|
|
120
|
+
if not chunk_res:
|
|
121
|
+
console.rule(f"[bold orange]No chunks were found for processing of {args.data}[/bold orange]")
|
|
122
|
+
|
|
123
|
+
return
|
|
124
|
+
|
|
116
125
|
console.rule("Processing chunks locally")
|
|
117
126
|
|
|
118
127
|
if args.embed_override:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.62.
|
|
3
|
+
Version: 0.62.18
|
|
4
4
|
Summary: Large Language Model DevOps - a package to help deploy LLMs to the Cloud.
|
|
5
5
|
Home-page: https://github.com/sunholo-data/sunholo-py
|
|
6
|
-
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.62.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.62.18.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|