sunholo 0.81.5__py3-none-any.whl → 0.82.0__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 +1 -1
- sunholo/pubsub/__init__.py +1 -1
- sunholo/pubsub/process_pubsub.py +15 -3
- {sunholo-0.81.5.dist-info → sunholo-0.82.0.dist-info}/METADATA +2 -2
- {sunholo-0.81.5.dist-info → sunholo-0.82.0.dist-info}/RECORD +9 -9
- {sunholo-0.81.5.dist-info → sunholo-0.82.0.dist-info}/LICENSE.txt +0 -0
- {sunholo-0.81.5.dist-info → sunholo-0.82.0.dist-info}/WHEEL +0 -0
- {sunholo-0.81.5.dist-info → sunholo-0.82.0.dist-info}/entry_points.txt +0 -0
- {sunholo-0.81.5.dist-info → sunholo-0.82.0.dist-info}/top_level.txt +0 -0
sunholo/agents/swagger.py
CHANGED
|
@@ -173,7 +173,7 @@ def generate_swagger(vac_config, agent_config):
|
|
|
173
173
|
'description': 'Multivac (Multi-VAC) Cloud. Generate API keys (MULTIVAC_API_KEY) to enable access to private services. See more at https://dev.sunholo.com/',
|
|
174
174
|
'version': '0.1.0'
|
|
175
175
|
},
|
|
176
|
-
'host': '
|
|
176
|
+
'host': '${_ENDPOINTS_HOST}',
|
|
177
177
|
'basePath': '/v1',
|
|
178
178
|
'schemes': ['https'],
|
|
179
179
|
'produces': ['application/json'],
|
sunholo/pubsub/__init__.py
CHANGED
sunholo/pubsub/process_pubsub.py
CHANGED
|
@@ -16,8 +16,7 @@ from ..custom_logging import log
|
|
|
16
16
|
from ..gcs.metadata import get_object_metadata
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
def process_pubsub_message(data: dict) -> tuple:
|
|
19
|
+
def decode_pubsub_message(data: dict):
|
|
21
20
|
"""Extracts message data and metadata from a Pub/Sub message.
|
|
22
21
|
|
|
23
22
|
Args:
|
|
@@ -26,7 +25,6 @@ def process_pubsub_message(data: dict) -> tuple:
|
|
|
26
25
|
Returns:
|
|
27
26
|
tuple: A tuple containing the message data and attributes as metadata.
|
|
28
27
|
"""
|
|
29
|
-
# Decode the message data
|
|
30
28
|
message_data = base64.b64decode(data['message']['data']).decode('utf-8')
|
|
31
29
|
attributes = data['message'].get('attributes', {})
|
|
32
30
|
messageId = data['message'].get('messageId')
|
|
@@ -38,6 +36,20 @@ def process_pubsub_message(data: dict) -> tuple:
|
|
|
38
36
|
log.info(f"Process Pub/Sub was triggered by messageId {messageId} published at {publishTime}")
|
|
39
37
|
log.debug(f"Process Pub/Sub data: {message_data}")
|
|
40
38
|
|
|
39
|
+
return message_data, attributes, vector_name
|
|
40
|
+
|
|
41
|
+
def process_pubsub_message(data: dict) -> tuple:
|
|
42
|
+
"""Extracts message data and metadata from a Pub/Sub message for a Cloud Storage event.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
data (dict): The Pub/Sub message data.
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
tuple: A tuple containing the message data and attributes as metadata.
|
|
49
|
+
"""
|
|
50
|
+
# Decode the message data
|
|
51
|
+
message_data, attributes, vector_name = decode_pubsub_message(data)
|
|
52
|
+
|
|
41
53
|
# Check for a valid GCS event type and payload format
|
|
42
54
|
if attributes.get("eventType") == "OBJECT_FINALIZE" and attributes.get("payloadFormat") == "JSON_API_V1":
|
|
43
55
|
objectId = attributes.get("objectId")
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.82.0
|
|
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.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.82.0.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -7,7 +7,7 @@ sunholo/agents/langserve.py,sha256=C46ph2mnygr6bdHijYWYyfQDI9ylAF0_9Kx2PfcCJpU,4
|
|
|
7
7
|
sunholo/agents/pubsub.py,sha256=TscZN_6am6DfaQkC-Yl18ZIBOoLE-0nDSiil6GpQEh4,1344
|
|
8
8
|
sunholo/agents/route.py,sha256=Mo-YOHDsHOiQXfb6VmCH0BPThAD-0jZGIkIKAHxSDdc,2986
|
|
9
9
|
sunholo/agents/special_commands.py,sha256=YhN8_E4cGZVvagN5_fouaxZiVbxr7PEhSzoFcvTKH54,6501
|
|
10
|
-
sunholo/agents/swagger.py,sha256=
|
|
10
|
+
sunholo/agents/swagger.py,sha256=2tzGmpveUMmTREykZvVnDj3j295wyOMu7mUFDnXdY3c,10671
|
|
11
11
|
sunholo/agents/fastapi/__init__.py,sha256=S_pj4_bTUmDGoq_exaREHlOKThi0zTuGT0VZY0YfODQ,88
|
|
12
12
|
sunholo/agents/fastapi/base.py,sha256=W-cyF8ZDUH40rc-c-Apw3-_8IIi2e4Y9qRtnoVnsc1Q,2521
|
|
13
13
|
sunholo/agents/fastapi/qna_routes.py,sha256=lKHkXPmwltu9EH3RMwmD153-J6pE7kWQ4BhBlV3to-s,3864
|
|
@@ -99,8 +99,8 @@ sunholo/patches/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
99
99
|
sunholo/patches/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
100
100
|
sunholo/patches/langchain/lancedb.py,sha256=KstVpYtI2E1s6_l_kq6js8ruIPJduO6nnvAXbqjoqCc,7507
|
|
101
101
|
sunholo/patches/langchain/vertexai.py,sha256=kX1IvC2D1kMgM3SaSzP9HEosbD6CUymLJd7w9eXo3eE,17677
|
|
102
|
-
sunholo/pubsub/__init__.py,sha256=
|
|
103
|
-
sunholo/pubsub/process_pubsub.py,sha256=
|
|
102
|
+
sunholo/pubsub/__init__.py,sha256=DfTEk4zmCfqn6gFxRrqDO0pOrvXTDqH-medpgYO4PGw,117
|
|
103
|
+
sunholo/pubsub/process_pubsub.py,sha256=ziz8OxdFfFzCYNIOy0v3SxZEPVKd3brKOvK2RtY9d70,3079
|
|
104
104
|
sunholo/pubsub/pubsub_manager.py,sha256=19w_N0LiG-wgVWvgJ13b8BUeN8ZzgSPXAhPmL1HRRSI,6966
|
|
105
105
|
sunholo/qna/__init__.py,sha256=F8q1uR_HreoSX0IfmKY1qoSwIgXhO2Q8kuDSxh9_-EE,28
|
|
106
106
|
sunholo/qna/parsers.py,sha256=Ye3M0CUIIV9sSRU6yqM4p8bdJUh3QyrolSXbGnjMYD8,2153
|
|
@@ -134,9 +134,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
|
|
|
134
134
|
sunholo/vertex/memory_tools.py,sha256=pgSahVDh7GPEulu3nl-w0jb5lTClb4TCnVxPnMokNZY,7533
|
|
135
135
|
sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
|
|
136
136
|
sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
|
|
137
|
-
sunholo-0.
|
|
138
|
-
sunholo-0.
|
|
139
|
-
sunholo-0.
|
|
140
|
-
sunholo-0.
|
|
141
|
-
sunholo-0.
|
|
142
|
-
sunholo-0.
|
|
137
|
+
sunholo-0.82.0.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
|
|
138
|
+
sunholo-0.82.0.dist-info/METADATA,sha256=jXSJ7wv7O7Y7dcyP0p_Tn0x0MxKmlyfCAfg6t92RLtA,7348
|
|
139
|
+
sunholo-0.82.0.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
140
|
+
sunholo-0.82.0.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
|
|
141
|
+
sunholo-0.82.0.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
|
|
142
|
+
sunholo-0.82.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|