sunholo 0.84.0__py3-none-any.whl → 0.84.2__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/__init__.py +1 -1
- sunholo/agents/flask/vac_routes.py +6 -6
- sunholo/database/alloydb_client.py +2 -2
- {sunholo-0.84.0.dist-info → sunholo-0.84.2.dist-info}/METADATA +2 -2
- {sunholo-0.84.0.dist-info → sunholo-0.84.2.dist-info}/RECORD +9 -9
- {sunholo-0.84.0.dist-info → sunholo-0.84.2.dist-info}/LICENSE.txt +0 -0
- {sunholo-0.84.0.dist-info → sunholo-0.84.2.dist-info}/WHEEL +0 -0
- {sunholo-0.84.0.dist-info → sunholo-0.84.2.dist-info}/entry_points.txt +0 -0
- {sunholo-0.84.0.dist-info → sunholo-0.84.2.dist-info}/top_level.txt +0 -0
sunholo/agents/__init__.py
CHANGED
|
@@ -2,6 +2,6 @@ from .chat_history import extract_chat_history
|
|
|
2
2
|
from .dispatch_to_qa import send_to_qa, send_to_qa_async
|
|
3
3
|
from .pubsub import process_pubsub
|
|
4
4
|
from .special_commands import handle_special_commands, app_to_store, handle_files
|
|
5
|
-
from .flask import register_qna_routes, create_app
|
|
5
|
+
from .flask import register_qna_routes, create_app, VACRoutes
|
|
6
6
|
from .fastapi import register_qna_fastapi_routes, create_fastapi_app
|
|
7
7
|
from .swagger import config_to_swagger
|
|
@@ -13,7 +13,7 @@ from ...utils.version import sunholo_version
|
|
|
13
13
|
import os
|
|
14
14
|
from ...gcs.add_file import add_file_to_gcs, handle_base64_image
|
|
15
15
|
from ..swagger import validate_api_key
|
|
16
|
-
from datetime import
|
|
16
|
+
from datetime import timedelta
|
|
17
17
|
|
|
18
18
|
try:
|
|
19
19
|
from flask import request, jsonify, Response
|
|
@@ -95,7 +95,7 @@ if __name__ == "__main__":
|
|
|
95
95
|
openai_response = {
|
|
96
96
|
"id": response_id,
|
|
97
97
|
"object": "chat.completion",
|
|
98
|
-
"created": str(int(datetime.now().timestamp())),
|
|
98
|
+
"created": str(int(datetime.datetime.now().timestamp())),
|
|
99
99
|
"model": vector_name,
|
|
100
100
|
"system_fingerprint": sunholo_version(),
|
|
101
101
|
"choices": [{
|
|
@@ -137,7 +137,7 @@ if __name__ == "__main__":
|
|
|
137
137
|
name="start_streaming_chat",
|
|
138
138
|
metadata=vac_config,
|
|
139
139
|
input = all_input,
|
|
140
|
-
completion_start_time=datetime.datetime.now(),
|
|
140
|
+
completion_start_time=str(int(datetime.datetime.now().timestamp())),
|
|
141
141
|
model=vac_config.get("model") or vac_config.get("llm")
|
|
142
142
|
)
|
|
143
143
|
|
|
@@ -247,7 +247,7 @@ if __name__ == "__main__":
|
|
|
247
247
|
return jsonify({'error': '_ENDPOINTS_HOST environment variable not found'}), 401
|
|
248
248
|
|
|
249
249
|
# Check cache first
|
|
250
|
-
current_time = datetime.now()
|
|
250
|
+
current_time = datetime.datetime.now()
|
|
251
251
|
if api_key in api_key_cache:
|
|
252
252
|
cached_result, cache_time = api_key_cache[api_key]
|
|
253
253
|
if current_time - cache_time < cache_duration:
|
|
@@ -340,7 +340,7 @@ if __name__ == "__main__":
|
|
|
340
340
|
openai_chunk = {
|
|
341
341
|
"id": response_id,
|
|
342
342
|
"object": "chat.completion.chunk",
|
|
343
|
-
"created": str(int(datetime.now().timestamp())),
|
|
343
|
+
"created": str(int(datetime.datetime.now().timestamp())),
|
|
344
344
|
"model": vector_name,
|
|
345
345
|
"system_fingerprint": sunholo_version(),
|
|
346
346
|
"choices": [{
|
|
@@ -357,7 +357,7 @@ if __name__ == "__main__":
|
|
|
357
357
|
final_chunk = {
|
|
358
358
|
"id": response_id,
|
|
359
359
|
"object": "chat.completion.chunk",
|
|
360
|
-
"created": str(int(datetime.now().timestamp())),
|
|
360
|
+
"created": str(int(datetime.datetime.now().timestamp())),
|
|
361
361
|
"model": vector_name,
|
|
362
362
|
"system_fingerprint": sunholo_version(),
|
|
363
363
|
"choices": [{
|
|
@@ -115,7 +115,7 @@ class AlloyDBClient:
|
|
|
115
115
|
log.error("Can't create AlloyDBEngine - install via `pip install sunholo[gcp,database]`")
|
|
116
116
|
raise ValueError("Can't import AlloyDBEngine")
|
|
117
117
|
|
|
118
|
-
log.info("Inititaing AlloyDB Langchain engine for database: {self.database}")
|
|
118
|
+
log.info(f"Inititaing AlloyDB Langchain engine for database: {self.database}")
|
|
119
119
|
|
|
120
120
|
from google.cloud.alloydb.connector import IPTypes
|
|
121
121
|
engine = AlloyDBEngine.from_instance(
|
|
@@ -214,7 +214,7 @@ class AlloyDBClient:
|
|
|
214
214
|
query = f"""
|
|
215
215
|
SELECT *
|
|
216
216
|
FROM {table_name}
|
|
217
|
-
WHERE doc_id = {doc_id}
|
|
217
|
+
WHERE doc_id = '{doc_id}'
|
|
218
218
|
LIMIT 1;
|
|
219
219
|
"""
|
|
220
220
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.84.
|
|
3
|
+
Version: 0.84.2
|
|
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.84.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.84.2.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
sunholo/__init__.py,sha256=_SOIvXrM6y4PBA8GIbizABnAk26YEXOLQtNsI0IAmyg,1008
|
|
2
2
|
sunholo/custom_logging.py,sha256=YfIN1oP3dOEkkYkyRBU8BGS3uJFGwUDsFCl8mIVbwvE,12225
|
|
3
|
-
sunholo/agents/__init__.py,sha256=
|
|
3
|
+
sunholo/agents/__init__.py,sha256=X2I3pPkGeKWjc3d0QgSpkTyqD8J8JtrEWqwrumf1MMc,391
|
|
4
4
|
sunholo/agents/chat_history.py,sha256=Gph_CdlP2otYnNdR1q1Umyyyvcad2F6K3LxU5yBQ9l0,5387
|
|
5
5
|
sunholo/agents/dispatch_to_qa.py,sha256=49-10UGxwcqA65Lm-S2ofTBaDHZLRZgSWy-Jj8OwKHs,8381
|
|
6
6
|
sunholo/agents/langserve.py,sha256=C46ph2mnygr6bdHijYWYyfQDI9ylAF0_9Kx2PfcCJpU,4414
|
|
@@ -14,7 +14,7 @@ sunholo/agents/fastapi/qna_routes.py,sha256=lKHkXPmwltu9EH3RMwmD153-J6pE7kWQ4BhB
|
|
|
14
14
|
sunholo/agents/flask/__init__.py,sha256=poJDKMr2qj8qMb99JqCvCPSiEt1tj2tLQ3hKW3f2aVw,107
|
|
15
15
|
sunholo/agents/flask/base.py,sha256=FgSaCODyoTtlstJtsqlLPScdgRUtv9_plxftdzHdVFo,809
|
|
16
16
|
sunholo/agents/flask/qna_routes.py,sha256=uwUD1yrzOPH27m2AXpiQrPk_2VfJOQOM6dAynOWQtoQ,22532
|
|
17
|
-
sunholo/agents/flask/vac_routes.py,sha256=
|
|
17
|
+
sunholo/agents/flask/vac_routes.py,sha256=aHVaWCfdOTMdtlbCdRbxn0cPQ1YZkUF0lG0xfNbbZUw,19575
|
|
18
18
|
sunholo/archive/__init__.py,sha256=qNHWm5rGPVOlxZBZCpA1wTYPbalizRT7f8X4rs2t290,31
|
|
19
19
|
sunholo/archive/archive.py,sha256=PxVfDtO2_2ZEEbnhXSCbXLdeoHoQVImo4y3Jr2XkCFY,1204
|
|
20
20
|
sunholo/auth/__init__.py,sha256=TeP-OY0XGxYV_8AQcVGoh35bvyWhNUcMRfhuD5l44Sk,91
|
|
@@ -59,7 +59,7 @@ sunholo/components/retriever.py,sha256=bKIVT7_18Ut3OJd0E0jyiISPnD9qkHWVjcQPT4i1_
|
|
|
59
59
|
sunholo/components/vectorstore.py,sha256=xKk7micTRwZckaI7U6PxvFz_ZSjCH48xPTDYiDcv2tc,5913
|
|
60
60
|
sunholo/database/__init__.py,sha256=bpB5Nk21kwqYj-qdVnvNgXjLsbflnH4g-San7OHMqR4,283
|
|
61
61
|
sunholo/database/alloydb.py,sha256=YH8wNPS8gN-TDZEXQcVHxwd1NScHRfAxma3gK4R6KCk,11740
|
|
62
|
-
sunholo/database/alloydb_client.py,sha256=
|
|
62
|
+
sunholo/database/alloydb_client.py,sha256=Qa1nP2f_84IIGLCgcO5RcBVO_TduSt9wXyA1ytsvA7g,14620
|
|
63
63
|
sunholo/database/database.py,sha256=VqhZdkXUNdvWn8sUcUV3YNby1JDVf7IykPVXWBtxo9U,7361
|
|
64
64
|
sunholo/database/lancedb.py,sha256=DyfZntiFKBlVPaFooNN1Z6Pl-LAs4nxWKKuq8GBqN58,715
|
|
65
65
|
sunholo/database/static_dbs.py,sha256=8cvcMwUK6c32AS2e_WguKXWMkFf5iN3g9WHzsh0C07Q,442
|
|
@@ -135,9 +135,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
|
|
|
135
135
|
sunholo/vertex/memory_tools.py,sha256=q_phxgGX2TG2j2MXNULF2xGzQnQPENwjPN9nZ_A9Gh0,7526
|
|
136
136
|
sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
|
|
137
137
|
sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
|
|
138
|
-
sunholo-0.84.
|
|
139
|
-
sunholo-0.84.
|
|
140
|
-
sunholo-0.84.
|
|
141
|
-
sunholo-0.84.
|
|
142
|
-
sunholo-0.84.
|
|
143
|
-
sunholo-0.84.
|
|
138
|
+
sunholo-0.84.2.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
|
|
139
|
+
sunholo-0.84.2.dist-info/METADATA,sha256=sv0BqqtNuoHQdcURLjCRkuHu3R5y6kxF2jTW103CMHk,7412
|
|
140
|
+
sunholo-0.84.2.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
141
|
+
sunholo-0.84.2.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
|
|
142
|
+
sunholo-0.84.2.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
|
|
143
|
+
sunholo-0.84.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|