sunholo 0.113.0__py3-none-any.whl → 0.113.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/gcs/add_file.py +5 -3
- sunholo/genai/process_funcs_cls.py +4 -3
- {sunholo-0.113.0.dist-info → sunholo-0.113.2.dist-info}/METADATA +2 -2
- {sunholo-0.113.0.dist-info → sunholo-0.113.2.dist-info}/RECORD +8 -8
- {sunholo-0.113.0.dist-info → sunholo-0.113.2.dist-info}/LICENSE.txt +0 -0
- {sunholo-0.113.0.dist-info → sunholo-0.113.2.dist-info}/WHEEL +0 -0
- {sunholo-0.113.0.dist-info → sunholo-0.113.2.dist-info}/entry_points.txt +0 -0
- {sunholo-0.113.0.dist-info → sunholo-0.113.2.dist-info}/top_level.txt +0 -0
sunholo/gcs/add_file.py
CHANGED
|
@@ -45,7 +45,9 @@ def handle_base64_image(base64_data: str, vector_name: str, extension: str):
|
|
|
45
45
|
raise ValueError(f"Invalid Base64 image data: Missing metadata header {base64_data}")
|
|
46
46
|
|
|
47
47
|
if model.startswith("openai"): # pass it to gpt directly
|
|
48
|
-
|
|
48
|
+
mime_type = base64_data.split(",", 1)
|
|
49
|
+
log.info(f"Returning directly as openai - mime_type: {mime_type}")
|
|
50
|
+
return base64_data, mime_type
|
|
49
51
|
|
|
50
52
|
try:
|
|
51
53
|
header, encoded = base64_data.split(",", 1)
|
|
@@ -58,8 +60,8 @@ def handle_base64_image(base64_data: str, vector_name: str, extension: str):
|
|
|
58
60
|
image_uri = add_file_to_gcs(filename, vector_name)
|
|
59
61
|
os.remove(filename) # Clean up the saved file
|
|
60
62
|
|
|
61
|
-
# Determine MIME type based on
|
|
62
|
-
mime_type = guess_mime_type(
|
|
63
|
+
# Determine MIME type based on filename
|
|
64
|
+
mime_type = guess_mime_type(filename) or "application/octet-stream"
|
|
63
65
|
|
|
64
66
|
return image_uri, mime_type
|
|
65
67
|
except Exception as e:
|
|
@@ -491,7 +491,7 @@ class GenAIFunctionProcessor:
|
|
|
491
491
|
|
|
492
492
|
except Exception as e:
|
|
493
493
|
msg = f"Error sending {content} to model: {str(e)}"
|
|
494
|
-
if
|
|
494
|
+
if "finish_reason: 10" in str(e):
|
|
495
495
|
msg = "The Gemini API does not work with this input - you need to try something else. Error is: finish_reason: 10"
|
|
496
496
|
log.error(msg + f"{traceback.format_exc()}")
|
|
497
497
|
token_queue.append(msg)
|
|
@@ -590,6 +590,7 @@ class GenAIFunctionProcessor:
|
|
|
590
590
|
log.warning(f"{fn_result_json} did not work for decide_to_go_on")
|
|
591
591
|
token = f"Error calling decide_to_go_on with {fn_result=}\n"
|
|
592
592
|
else:
|
|
593
|
+
|
|
593
594
|
token = f"--- {fn_log} result --- \n"
|
|
594
595
|
# if json dict we look for keys to extract
|
|
595
596
|
if fn_result_json:
|
|
@@ -621,8 +622,8 @@ class GenAIFunctionProcessor:
|
|
|
621
622
|
|
|
622
623
|
if this_text:
|
|
623
624
|
#content.append(f"Agent: {this_text}")
|
|
624
|
-
# update content relying on gemini chat history instead
|
|
625
|
-
content =
|
|
625
|
+
# update content relying on gemini chat history instead, and the parsed function result objects
|
|
626
|
+
content = executed_responses
|
|
626
627
|
# if text includes gs:// try to download it
|
|
627
628
|
image_uploads = extract_gs_images_and_genai_upload(this_text)
|
|
628
629
|
if image_uploads:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.113.
|
|
3
|
+
Version: 0.113.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.113.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.113.2.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -80,7 +80,7 @@ sunholo/embedder/embed_chunk.py,sha256=_FdO4-9frUJlDPqXv2Ai49ejUrrMTMGti3D7bfJGf
|
|
|
80
80
|
sunholo/excel/__init__.py,sha256=AqTMN9K4qJYi4maEgoORc5oxDVGO_eqmwzDaVP37JgY,56
|
|
81
81
|
sunholo/excel/plugin.py,sha256=rl3FoECZ6Ts8KKExPrbPwr3u3CegZfsevmcjgUXAlhE,4033
|
|
82
82
|
sunholo/gcs/__init__.py,sha256=SZvbsMFDko40sIRHTHppA37IijvJTae54vrhooEF5-4,90
|
|
83
|
-
sunholo/gcs/add_file.py,sha256=
|
|
83
|
+
sunholo/gcs/add_file.py,sha256=Pd5Zc1a3gqbuBgSI-UDC2mQnYGLJbAh_-IUzkDN5s9k,8273
|
|
84
84
|
sunholo/gcs/download_folder.py,sha256=ijJTnS595JqZhBH8iHFErQilMbkuKgL-bnTCMLGuvlA,1614
|
|
85
85
|
sunholo/gcs/download_url.py,sha256=Ul81n1rklr8WogPsuxWWD1Nr8RHU451LzHPMJNhAKzw,6416
|
|
86
86
|
sunholo/gcs/extract_and_sign.py,sha256=paRrTCvCN5vkQwCB7OSkxWi-pfOgOtZ0bwdXE08c3Ps,1546
|
|
@@ -89,7 +89,7 @@ sunholo/genai/__init__.py,sha256=6SWK7uV5F625J-P3xQoD6WKL59a9RSaidj-Guslyt8Q,192
|
|
|
89
89
|
sunholo/genai/file_handling.py,sha256=Z3E7TR1DnP9WnneeEGC8LcT6k-9GFxwXDPaVZWw8HLE,8366
|
|
90
90
|
sunholo/genai/images.py,sha256=EyjsDqt6XQw99pZUQamomCpMOoIah9bp3XY94WPU7Ms,1678
|
|
91
91
|
sunholo/genai/init.py,sha256=yG8E67TduFCTQPELo83OJuWfjwTnGZsyACospahyEaY,687
|
|
92
|
-
sunholo/genai/process_funcs_cls.py,sha256=
|
|
92
|
+
sunholo/genai/process_funcs_cls.py,sha256=h-AiG99_wFgRdl7-tW9HkmVCDQyH0m2HT1Y7I-Hq5Lg,31940
|
|
93
93
|
sunholo/genai/safety.py,sha256=mkFDO_BeEgiKjQd9o2I4UxB6XI7a9U-oOFjZ8LGRUC4,1238
|
|
94
94
|
sunholo/invoke/__init__.py,sha256=o1RhwBGOtVK0MIdD55fAIMCkJsxTksi8GD5uoqVKI-8,184
|
|
95
95
|
sunholo/invoke/async_class.py,sha256=G8vD2H94fpBc37mSJSQODEKJ67P2mPQEHabtDaLOvxE,8033
|
|
@@ -150,9 +150,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
|
|
|
150
150
|
sunholo/vertex/memory_tools.py,sha256=tBZxqVZ4InTmdBvLlOYwoSEWu4-kGquc-gxDwZCC4FA,7667
|
|
151
151
|
sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
|
|
152
152
|
sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
|
|
153
|
-
sunholo-0.113.
|
|
154
|
-
sunholo-0.113.
|
|
155
|
-
sunholo-0.113.
|
|
156
|
-
sunholo-0.113.
|
|
157
|
-
sunholo-0.113.
|
|
158
|
-
sunholo-0.113.
|
|
153
|
+
sunholo-0.113.2.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
|
|
154
|
+
sunholo-0.113.2.dist-info/METADATA,sha256=9yE39JdBTtbh1f1ef9n7RfqWnTJGd-VAnilQWEmnfrE,8786
|
|
155
|
+
sunholo-0.113.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
156
|
+
sunholo-0.113.2.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
|
|
157
|
+
sunholo-0.113.2.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
|
|
158
|
+
sunholo-0.113.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|