sunholo 0.99.8__py3-none-any.whl → 0.99.10__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.
@@ -12,6 +12,8 @@ from collections import deque
12
12
  try:
13
13
  import google.generativeai as genai
14
14
  import proto
15
+ from google.generativeai.types import RequestOptions
16
+ from google.api_core import retry
15
17
  except ImportError:
16
18
  genai = None
17
19
 
@@ -351,7 +353,11 @@ class GenAIFunctionProcessor:
351
353
  log.error(f"Error initializing model: {str(err)}")
352
354
  return None
353
355
 
354
- def remove_invisible_characters(self, string:str):
356
+ def remove_invisible_characters(self, string):
357
+
358
+ if not isinstance(string, str):
359
+ return string
360
+
355
361
  clean = string.encode('utf-8').decode('unicode_escape')
356
362
  log.info(f"Cleaning:\n{string}\n > to >\n{clean}")
357
363
 
@@ -398,7 +404,14 @@ class GenAIFunctionProcessor:
398
404
 
399
405
  try:
400
406
  token_queue.append("\n= Calling Agent =\n")
401
- response = chat.send_message(content, stream=True)
407
+ response = chat.send_message(content, stream=True, request_options=RequestOptions(
408
+ retry=retry.Retry(
409
+ initial=10,
410
+ multiplier=2,
411
+ maximum=60,
412
+ timeout=300
413
+ )
414
+ ))
402
415
 
403
416
  except Exception as e:
404
417
  msg = f"Error sending {content} to model: {str(e)} - {traceback.format_exc()}"
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.99.8
3
+ Version: 0.99.10
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.99.8.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.99.10.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -86,7 +86,7 @@ sunholo/gcs/download_url.py,sha256=q1NiJSvEhdNrmU5ZJ-sBCMC_J5CxzrajY8LRgdPOV_M,6
86
86
  sunholo/gcs/metadata.py,sha256=oQLcXi4brsZ74aegWyC1JZmhlaEV270HS5_UWtAYYWE,898
87
87
  sunholo/genai/__init__.py,sha256=dBl6IA3-Fx6-Vx81r0XqxHlUq6WeW1iDX188dpChu8s,115
88
88
  sunholo/genai/init.py,sha256=yG8E67TduFCTQPELo83OJuWfjwTnGZsyACospahyEaY,687
89
- sunholo/genai/process_funcs_cls.py,sha256=mw-6qxtk6QedeWTSeP-hyfyc_LT8X_2_IXqAO6ZXkJc,25623
89
+ sunholo/genai/process_funcs_cls.py,sha256=VvZd5fxZ1_SUJUPeVYw8sf4H3ns6PwIGjDPeUo44USE,26194
90
90
  sunholo/genai/safety.py,sha256=mkFDO_BeEgiKjQd9o2I4UxB6XI7a9U-oOFjZ8LGRUC4,1238
91
91
  sunholo/invoke/__init__.py,sha256=o1RhwBGOtVK0MIdD55fAIMCkJsxTksi8GD5uoqVKI-8,184
92
92
  sunholo/invoke/async_class.py,sha256=uvCP8ekUCfTRWk7xwofTzRqFykMAwrRZ4Ce_YUR6PVs,2820
@@ -144,9 +144,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
144
144
  sunholo/vertex/memory_tools.py,sha256=tBZxqVZ4InTmdBvLlOYwoSEWu4-kGquc-gxDwZCC4FA,7667
145
145
  sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
146
146
  sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
147
- sunholo-0.99.8.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
- sunholo-0.99.8.dist-info/METADATA,sha256=o77jfs-et_Fqf2oI_oB3EA7xDAxuMlxWffcz9IHSa4E,8310
149
- sunholo-0.99.8.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
150
- sunholo-0.99.8.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
- sunholo-0.99.8.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
- sunholo-0.99.8.dist-info/RECORD,,
147
+ sunholo-0.99.10.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
+ sunholo-0.99.10.dist-info/METADATA,sha256=yTJtqwqKg0cX4g6nnwt9L5fjrn1I0DBGBRTXFevX7JI,8312
149
+ sunholo-0.99.10.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
150
+ sunholo-0.99.10.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
+ sunholo-0.99.10.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
+ sunholo-0.99.10.dist-info/RECORD,,