sunholo 0.66.5__py3-none-any.whl → 0.66.7__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/agents/swagger.py +13 -7
- sunholo/gcs/add_file.py +5 -4
- {sunholo-0.66.5.dist-info → sunholo-0.66.7.dist-info}/METADATA +5 -6
- {sunholo-0.66.5.dist-info → sunholo-0.66.7.dist-info}/RECORD +8 -8
- {sunholo-0.66.5.dist-info → sunholo-0.66.7.dist-info}/LICENSE.txt +0 -0
- {sunholo-0.66.5.dist-info → sunholo-0.66.7.dist-info}/WHEEL +0 -0
- {sunholo-0.66.5.dist-info → sunholo-0.66.7.dist-info}/entry_points.txt +0 -0
- {sunholo-0.66.5.dist-info → sunholo-0.66.7.dist-info}/top_level.txt +0 -0
sunholo/agents/swagger.py
CHANGED
|
@@ -7,28 +7,34 @@ from io import StringIO
|
|
|
7
7
|
# check it here:
|
|
8
8
|
# https://editor.swagger.io/
|
|
9
9
|
from functools import lru_cache
|
|
10
|
+
import uuid
|
|
10
11
|
|
|
11
12
|
try:
|
|
12
|
-
from google.cloud import
|
|
13
|
+
from google.cloud import servicecontrol_v1
|
|
13
14
|
except ImportError:
|
|
14
|
-
|
|
15
|
+
servicecontrol_v1 = None
|
|
15
16
|
|
|
16
17
|
def validate_api_key(api_key: str, service_name: str) -> bool:
|
|
17
18
|
"""
|
|
18
19
|
Validate an API key against the service name e.g. 'endpoints-xxxx.a.run.app'
|
|
19
20
|
"""
|
|
20
|
-
if not
|
|
21
|
-
raise ImportError("Cloud Endpoints API key validation is required, install via `pip install
|
|
21
|
+
if not servicecontrol_v1:
|
|
22
|
+
raise ImportError("Cloud Endpoints API key validation is required, install via `pip install sunholo[gcp]`")
|
|
22
23
|
|
|
23
24
|
return _validate_api_key_cached(api_key, service_name)
|
|
24
25
|
|
|
26
|
+
|
|
25
27
|
@lru_cache(maxsize=1024)
|
|
26
28
|
def _validate_api_key_cached(api_key: str, service_name: str) -> bool:
|
|
27
|
-
client =
|
|
28
|
-
|
|
29
|
+
client = servicecontrol_v1.ServiceControllerClient()
|
|
30
|
+
request = servicecontrol_v1.CheckRequest(
|
|
29
31
|
service_name=service_name,
|
|
30
|
-
operation=
|
|
32
|
+
operation=servicecontrol_v1.Operation(
|
|
33
|
+
operation_id=str(uuid.uuid4()),
|
|
34
|
+
consumer_id=f'api_key:{api_key}',
|
|
35
|
+
)
|
|
31
36
|
)
|
|
37
|
+
response = client.check(request=request)
|
|
32
38
|
|
|
33
39
|
return response.check_errors is None
|
|
34
40
|
|
sunholo/gcs/add_file.py
CHANGED
|
@@ -51,10 +51,11 @@ def add_file_to_gcs(filename: str, vector_name:str, bucket_name: str=None, metad
|
|
|
51
51
|
log.error(f"Error creating storage client: {str(err)}")
|
|
52
52
|
return None
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if bucket_config
|
|
57
|
-
|
|
54
|
+
if bucket_name is None:
|
|
55
|
+
bucket_config = load_config_key("upload", vector_name, "vacConfig")
|
|
56
|
+
if bucket_config:
|
|
57
|
+
if bucket_config.get("buckets"):
|
|
58
|
+
bucket_name = bucket_config.get("buckets").get("all")
|
|
58
59
|
|
|
59
60
|
bucket_name = bucket_name if bucket_name else os.getenv('GCS_BUCKET', None)
|
|
60
61
|
if bucket_name is None:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.66.
|
|
3
|
+
Version: 0.66.7
|
|
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.7.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -19,9 +19,8 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE.txt
|
|
21
21
|
Requires-Dist: google-auth
|
|
22
|
-
Requires-Dist: tenacity ==8.3.0
|
|
23
22
|
Requires-Dist: ruamel.yaml
|
|
24
|
-
Requires-Dist: langchain
|
|
23
|
+
Requires-Dist: langchain >=0.2.5
|
|
25
24
|
Requires-Dist: langchain-experimental
|
|
26
25
|
Requires-Dist: langchain-community
|
|
27
26
|
Provides-Extra: all
|
|
@@ -36,7 +35,7 @@ Requires-Dist: google-api-python-client ; extra == 'all'
|
|
|
36
35
|
Requires-Dist: google-cloud-alloydb-connector[pg8000] ; extra == 'all'
|
|
37
36
|
Requires-Dist: google-cloud-bigquery ; extra == 'all'
|
|
38
37
|
Requires-Dist: google-cloud-build ; extra == 'all'
|
|
39
|
-
Requires-Dist: google-
|
|
38
|
+
Requires-Dist: google-cloud-service-control ; extra == 'all'
|
|
40
39
|
Requires-Dist: google-cloud-logging ; extra == 'all'
|
|
41
40
|
Requires-Dist: google-cloud-storage ; extra == 'all'
|
|
42
41
|
Requires-Dist: google-cloud-pubsub ; extra == 'all'
|
|
@@ -82,7 +81,7 @@ Requires-Dist: google-auth-oauthlib ; extra == 'gcp'
|
|
|
82
81
|
Requires-Dist: google-cloud-aiplatform ; extra == 'gcp'
|
|
83
82
|
Requires-Dist: google-cloud-bigquery ; extra == 'gcp'
|
|
84
83
|
Requires-Dist: google-cloud-build ; extra == 'gcp'
|
|
85
|
-
Requires-Dist: google-
|
|
84
|
+
Requires-Dist: google-cloud-service-control ; extra == 'gcp'
|
|
86
85
|
Requires-Dist: google-cloud-storage ; extra == 'gcp'
|
|
87
86
|
Requires-Dist: google-cloud-logging ; extra == 'gcp'
|
|
88
87
|
Requires-Dist: google-cloud-pubsub ; extra == 'gcp'
|
|
@@ -7,7 +7,7 @@ sunholo/agents/langserve.py,sha256=FdhQjorAY2bMn2rpuabNT6bU3uqSKWrl8DjpH3L_V7k,4
|
|
|
7
7
|
sunholo/agents/pubsub.py,sha256=5hbbhbBGyVWRpt2sAGC5FEheYH1mCCwVUhZEB1S7vGg,1337
|
|
8
8
|
sunholo/agents/route.py,sha256=V1HKXTvaNuYgjmT5_QgIQum4O7O0Mw497m6YiMpEzX0,2383
|
|
9
9
|
sunholo/agents/special_commands.py,sha256=ecD5jrBVXo170sdgPILi0m_m_4nRFEv6qKn5zYEvEK8,6494
|
|
10
|
-
sunholo/agents/swagger.py,sha256=
|
|
10
|
+
sunholo/agents/swagger.py,sha256=Z_nTumM9KNtuY-jqDUvvkZbxKd15dOs3mWZavLS-pc0,12560
|
|
11
11
|
sunholo/agents/fastapi/__init__.py,sha256=S_pj4_bTUmDGoq_exaREHlOKThi0zTuGT0VZY0YfODQ,88
|
|
12
12
|
sunholo/agents/fastapi/base.py,sha256=clk76cHbUAvU0OYJrRfCWX_5f0ACbhDsIzYBhI3wyoE,2514
|
|
13
13
|
sunholo/agents/fastapi/qna_routes.py,sha256=DgK4Btu5XriOC1JaRQ4G_nWEjJfnQ0J5pyLanF6eF1g,3857
|
|
@@ -61,7 +61,7 @@ sunholo/database/sql/sb/setup.sql,sha256=CvoFvZQev2uWjmFa3aj3m3iuPFzAAJZ0S7Qi3L3
|
|
|
61
61
|
sunholo/embedder/__init__.py,sha256=sI4N_CqgEVcrMDxXgxKp1FsfsB4FpjoXgPGkl4N_u4I,44
|
|
62
62
|
sunholo/embedder/embed_chunk.py,sha256=E6fHn2SFeQu9jsBO1wg5hSJUPTKbZ95Yc5QOltSn7jo,5840
|
|
63
63
|
sunholo/gcs/__init__.py,sha256=DtVw_AZwQn-IguR5BJuIi2XJeF_FQXizhJikzRNrXiE,50
|
|
64
|
-
sunholo/gcs/add_file.py,sha256=
|
|
64
|
+
sunholo/gcs/add_file.py,sha256=ILU3Nq-rYjL0Ini9op6jBYtXCDl3iTO61ZA1q2zykJQ,5537
|
|
65
65
|
sunholo/gcs/download_url.py,sha256=8XSEf8byfubqs5CMQeF_tn9wxqwUTq3n9mo5mLNIUTA,4801
|
|
66
66
|
sunholo/gcs/metadata.py,sha256=C9sMPsHsq1ETetdQCqB3EBs3Kws8b8QHS9L7ei_v5aw,891
|
|
67
67
|
sunholo/langfuse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -104,9 +104,9 @@ sunholo/vertex/__init__.py,sha256=JvHcGFuv6R_nAhY2AdoqqhMpJ5ugeWPZ_svGhWrObBk,13
|
|
|
104
104
|
sunholo/vertex/init.py,sha256=JDMUaBRdednzbKF-5p33qqLit2LMsvgvWW-NRz0AqO0,1801
|
|
105
105
|
sunholo/vertex/memory_tools.py,sha256=8F1iTWnqEK9mX4W5RzCVKIjydIcNp6OFxjn_dtQ3GXo,5379
|
|
106
106
|
sunholo/vertex/safety.py,sha256=3meAX0HyGZYrH7rXPUAHxtI_3w_zoy_RX7Shtkoa660,1275
|
|
107
|
-
sunholo-0.66.
|
|
108
|
-
sunholo-0.66.
|
|
109
|
-
sunholo-0.66.
|
|
110
|
-
sunholo-0.66.
|
|
111
|
-
sunholo-0.66.
|
|
112
|
-
sunholo-0.66.
|
|
107
|
+
sunholo-0.66.7.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
|
|
108
|
+
sunholo-0.66.7.dist-info/METADATA,sha256=NdblWyff5u7uZuxVpW-dXrXvw5TmFCXdRvQVPQyQjLg,6096
|
|
109
|
+
sunholo-0.66.7.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
|
|
110
|
+
sunholo-0.66.7.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
|
|
111
|
+
sunholo-0.66.7.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
|
|
112
|
+
sunholo-0.66.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|