sunholo 0.66.21__tar.gz → 0.66.22__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.66.21 → sunholo-0.66.22}/PKG-INFO +2 -2
- {sunholo-0.66.21 → sunholo-0.66.22}/setup.py +1 -1
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/dispatch_to_qa.py +2 -2
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/auth/run.py +5 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/chat_vac.py +8 -4
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/run_proxy.py +0 -1
- sunholo-0.66.22/sunholo/utils/api_key.py +13 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo.egg-info/PKG-INFO +2 -2
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo.egg-info/SOURCES.txt +1 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/LICENSE.txt +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/MANIFEST.in +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/README.md +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/setup.cfg +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/chat_history.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/fastapi/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/fastapi/base.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/fastapi/qna_routes.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/flask/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/flask/base.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/flask/qna_routes.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/langserve.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/pubsub.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/route.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/special_commands.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/agents/swagger.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/archive/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/archive/archive.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/auth/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/bots/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/bots/discord.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/bots/github_webhook.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/bots/webapp.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/chunker/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/chunker/data_to_embed_pubsub.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/chunker/doc_handling.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/chunker/images.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/chunker/loaders.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/chunker/message_data.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/chunker/pdfs.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/chunker/publish.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/chunker/splitter.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/cli.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/cli_init.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/configs.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/deploy.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/embedder.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/merge_texts.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/sun_rich.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/cli/swagger.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/components/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/components/llm.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/components/retriever.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/components/vectorstore.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/alloydb.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/database.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/lancedb.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/sql/sb/create_function.sql +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/sql/sb/create_function_time.sql +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/sql/sb/create_table.sql +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/sql/sb/delete_source_row.sql +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/sql/sb/return_sources.sql +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/sql/sb/setup.sql +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/static_dbs.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/database/uuid.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/embedder/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/embedder/embed_chunk.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/gcs/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/gcs/add_file.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/gcs/download_url.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/gcs/metadata.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/langfuse/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/langfuse/callback.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/langfuse/prompts.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/llamaindex/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/llamaindex/generate.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/llamaindex/get_files.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/llamaindex/import_files.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/logging.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/lookup/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/lookup/model_lookup.yaml +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/patches/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/patches/langchain/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/patches/langchain/lancedb.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/patches/langchain/vertexai.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/pubsub/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/pubsub/process_pubsub.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/pubsub/pubsub_manager.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/qna/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/qna/parsers.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/qna/retry.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/streaming/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/streaming/content_buffer.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/streaming/langserve.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/streaming/stream_lookup.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/streaming/streaming.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/summarise/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/summarise/summarise.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/utils/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/utils/big_context.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/utils/config.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/utils/config_schema.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/utils/gcp.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/utils/gcp_project.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/utils/parsers.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/utils/timedelta.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/utils/user_ids.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/utils/version.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/vertex/__init__.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/vertex/init.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/vertex/memory_tools.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo/vertex/safety.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo.egg-info/dependency_links.txt +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo.egg-info/entry_points.txt +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo.egg-info/requires.txt +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/sunholo.egg-info/top_level.txt +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/tests/test_chat_history.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/tests/test_chunker.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/tests/test_config.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/tests/test_dispatch_to_qa.py +0 -0
- {sunholo-0.66.21 → sunholo-0.66.22}/tests/test_swagger.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.66.
|
|
3
|
+
Version: 0.66.22
|
|
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.66.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.66.22.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -121,7 +121,7 @@ def send_to_qa(user_input, vector_name, chat_history, stream=False, **kwargs):
|
|
|
121
121
|
|
|
122
122
|
except requests.exceptions.HTTPError as err:
|
|
123
123
|
log.error(f"HTTP error occurred: {err}")
|
|
124
|
-
error_message = f"There was an error processing your request.
|
|
124
|
+
error_message = f"There was an error processing your request. {str(err)}"
|
|
125
125
|
if stream:
|
|
126
126
|
return iter([error_message])
|
|
127
127
|
else:
|
|
@@ -129,7 +129,7 @@ def send_to_qa(user_input, vector_name, chat_history, stream=False, **kwargs):
|
|
|
129
129
|
|
|
130
130
|
except Exception as err:
|
|
131
131
|
log.error(f"Other error occurred: {str(err)}")
|
|
132
|
-
error_message = f"Something went wrong.
|
|
132
|
+
error_message = f"Something went wrong. {str(err)}"
|
|
133
133
|
if stream:
|
|
134
134
|
return iter([error_message])
|
|
135
135
|
else:
|
|
@@ -4,6 +4,7 @@ import inspect
|
|
|
4
4
|
from typing import Dict, Optional
|
|
5
5
|
from ..utils.config import load_config_key, load_config
|
|
6
6
|
from ..utils.gcp import is_running_on_cloudrun
|
|
7
|
+
from ..utils.api_key import has_multivac_api_key, get_multivac_api_key
|
|
7
8
|
from ..logging import log
|
|
8
9
|
from ..agents.route import route_vac
|
|
9
10
|
|
|
@@ -48,6 +49,10 @@ def get_id_token(url: str) -> str:
|
|
|
48
49
|
)
|
|
49
50
|
|
|
50
51
|
def get_header(vector_name) -> Optional[dict]:
|
|
52
|
+
if has_multivac_api_key():
|
|
53
|
+
|
|
54
|
+
return {"x-api-key": get_multivac_api_key()}
|
|
55
|
+
|
|
51
56
|
if is_running_on_cloudrun():
|
|
52
57
|
run_url = get_run_url(vector_name)
|
|
53
58
|
else:
|
|
@@ -2,6 +2,7 @@ from ..agents import send_to_qa, handle_special_commands
|
|
|
2
2
|
from ..streaming import generate_proxy_stream, can_agent_stream
|
|
3
3
|
from ..utils.user_ids import generate_user_id
|
|
4
4
|
from ..utils.config import load_config_key
|
|
5
|
+
from ..utils.api_key import has_multivac_api_key
|
|
5
6
|
from ..logging import log
|
|
6
7
|
from ..qna.parsers import parse_output
|
|
7
8
|
from .run_proxy import clean_proxy_list, start_proxy, stop_proxy
|
|
@@ -234,21 +235,24 @@ def resolve_service_url(args, no_config=False):
|
|
|
234
235
|
console.print("Found agent_url within vacConfig: {agent_url}")
|
|
235
236
|
|
|
236
237
|
# via public cloud endpoints - assumes no gcloud auth
|
|
237
|
-
if
|
|
238
|
-
|
|
238
|
+
if has_multivac_api_key():
|
|
239
|
+
log.debug("Found MULTIVAC_API_KEY")
|
|
239
240
|
gcp_config = load_config_key("gcp_config", "global", "vacConfig")
|
|
240
241
|
endpoints_base_url = gcp_config.get("endpoints_base_url")
|
|
241
242
|
if not endpoints_base_url:
|
|
242
243
|
console.print("[bold red]MULTIVAC_API_KEY env var is set but no config.gcp_config.endpoints_base_url can be found[/bold red]")
|
|
243
244
|
sys.exit(1)
|
|
244
245
|
|
|
245
|
-
|
|
246
|
+
return f"{endpoints_base_url}/v1/{agent_name}"
|
|
246
247
|
|
|
247
248
|
# via direct access to agent url - requires gcloud auth access
|
|
248
249
|
elif args.no_proxy:
|
|
249
250
|
|
|
250
251
|
service_url = agent_url or get_cloud_run_service_url(args.project, args.region, agent_name)
|
|
251
252
|
console.print(f"No proxy, connecting directly to {service_url}")
|
|
253
|
+
|
|
254
|
+
return service_url
|
|
255
|
+
|
|
252
256
|
else:
|
|
253
257
|
# via gcloud proxy - requires gcloud auth access
|
|
254
258
|
try:
|
|
@@ -257,7 +261,7 @@ def resolve_service_url(args, no_config=False):
|
|
|
257
261
|
console.print(f"[bold red]ERROR: Could not start {args.vac_name} proxy URL: {str(e)}[/bold red]")
|
|
258
262
|
sys.exit(1)
|
|
259
263
|
|
|
260
|
-
|
|
264
|
+
return service_url
|
|
261
265
|
|
|
262
266
|
def vac_command(args):
|
|
263
267
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.66.
|
|
3
|
+
Version: 0.66.22
|
|
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.66.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.66.22.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -102,6 +102,7 @@ sunholo/streaming/streaming.py
|
|
|
102
102
|
sunholo/summarise/__init__.py
|
|
103
103
|
sunholo/summarise/summarise.py
|
|
104
104
|
sunholo/utils/__init__.py
|
|
105
|
+
sunholo/utils/api_key.py
|
|
105
106
|
sunholo/utils/big_context.py
|
|
106
107
|
sunholo/utils/config.py
|
|
107
108
|
sunholo/utils/config_schema.py
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|