sunholo 0.101.10__py3-none-any.whl → 0.101.12__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.
@@ -15,6 +15,7 @@ try:
15
15
  from google.generativeai.types import RequestOptions
16
16
  from google.api_core import retry
17
17
  from google.generativeai import ChatSession
18
+ from google.api_core.exceptions import RetryError
18
19
  except ImportError:
19
20
  genai = None
20
21
  ChatSession = None
@@ -441,9 +442,14 @@ class GenAIFunctionProcessor:
441
442
  initial=10,
442
443
  multiplier=2,
443
444
  maximum=60,
444
- timeout=60
445
+ timeout=90
445
446
  )
446
447
  ))
448
+ except RetryError as err:
449
+ msg = f"Retry error - lets try again if its occured less than twice: {str(err)}"
450
+ log.warning(msg)
451
+ token_queue.append(msg)
452
+ this_text += msg
447
453
 
448
454
  except Exception as e:
449
455
  msg = f"Error sending {content} to model: {str(e)} - {traceback.format_exc()}"
sunholo/utils/mime.py CHANGED
@@ -1,4 +1,5 @@
1
1
  import os
2
+ from ..custom_logging import log
2
3
 
3
4
  def guess_mime_type(file_path: str) -> str:
4
5
  """
@@ -18,6 +19,7 @@ def guess_mime_type(file_path: str) -> str:
18
19
  ext = ext.lower().strip('.')
19
20
 
20
21
  # Mapping of common file extensions to file types
22
+ log.info(f"Guessing {file_path} is {ext}")
21
23
  extension_to_type = {
22
24
  "jpg": "image/jpeg",
23
25
  "jpeg": "image/jpeg",
@@ -59,6 +61,8 @@ def guess_mime_type(file_path: str) -> str:
59
61
  "tsx": "text/tsx",
60
62
  "jsx": "text/jsx",
61
63
  }
62
-
63
- return extension_to_type.get(ext, "")
64
+ mime=extension_to_type.get(ext, "")
65
+ log.info(f"Guessing {file_path} with {ext=} is {mime=}")
66
+
67
+ return mime
64
68
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.101.10
3
+ Version: 0.101.12
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.101.10.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.101.12.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -88,7 +88,7 @@ sunholo/gcs/metadata.py,sha256=oQLcXi4brsZ74aegWyC1JZmhlaEV270HS5_UWtAYYWE,898
88
88
  sunholo/genai/__init__.py,sha256=dBl6IA3-Fx6-Vx81r0XqxHlUq6WeW1iDX188dpChu8s,115
89
89
  sunholo/genai/images.py,sha256=eW5V2h2JdNqLkaw_u-pJSzu7edHzvrCWPLirolQXX5s,1617
90
90
  sunholo/genai/init.py,sha256=yG8E67TduFCTQPELo83OJuWfjwTnGZsyACospahyEaY,687
91
- sunholo/genai/process_funcs_cls.py,sha256=r8WF0kF5nYhC3qBb9p8X5101taq3lvfhEqs3EPg5QJY,28799
91
+ sunholo/genai/process_funcs_cls.py,sha256=eCXRd4Aa9SNPdAjqN6Y2GYX_o5nlktHaS0zNk8mMtBM,29094
92
92
  sunholo/genai/safety.py,sha256=mkFDO_BeEgiKjQd9o2I4UxB6XI7a9U-oOFjZ8LGRUC4,1238
93
93
  sunholo/invoke/__init__.py,sha256=o1RhwBGOtVK0MIdD55fAIMCkJsxTksi8GD5uoqVKI-8,184
94
94
  sunholo/invoke/async_class.py,sha256=G8vD2H94fpBc37mSJSQODEKJ67P2mPQEHabtDaLOvxE,8033
@@ -134,7 +134,7 @@ sunholo/utils/config_class.py,sha256=aNhxhEHIxRvqQNq_9wFJt1yM9U1ypahCVZ3NzPWuay4
134
134
  sunholo/utils/config_schema.py,sha256=Wv-ncitzljOhgbDaq9qnFqH5LCuxNv59dTGDWgd1qdk,4189
135
135
  sunholo/utils/gcp.py,sha256=uueODEpA-P6O15-t0hmcGC9dONLO_hLfzSsSoQnkUss,4854
136
136
  sunholo/utils/gcp_project.py,sha256=Fa0IhCX12bZ1ctF_PKN8PNYd7hihEUfb90kilBfUDjg,1411
137
- sunholo/utils/mime.py,sha256=IBir-PcIkwM6GCWsohOkCXqdQWO6PxIgvmXOtaeu71U,1869
137
+ sunholo/utils/mime.py,sha256=7_J1PnWOlvAPRoHWKESAncdRVVldVwRdKvuDvi9sRfE,2020
138
138
  sunholo/utils/parsers.py,sha256=wES0fRn3GONoymRXOXt-z62HCoOiUvvFXa-MfKfjCls,6421
139
139
  sunholo/utils/timedelta.py,sha256=BbLabEx7_rbErj_YbNM0MBcaFN76DC4PTe4zD2ucezg,493
140
140
  sunholo/utils/user_ids.py,sha256=SQd5_H7FE7vcTZp9AQuQDWBXd4FEEd7TeVMQe1H4Ny8,292
@@ -147,9 +147,9 @@ sunholo/vertex/init.py,sha256=1OQwcPBKZYBTDPdyU7IM4X4OmiXLdsNV30C-fee2scQ,2875
147
147
  sunholo/vertex/memory_tools.py,sha256=tBZxqVZ4InTmdBvLlOYwoSEWu4-kGquc-gxDwZCC4FA,7667
148
148
  sunholo/vertex/safety.py,sha256=S9PgQT1O_BQAkcqauWncRJaydiP8Q_Jzmu9gxYfy1VA,2482
149
149
  sunholo/vertex/type_dict_to_json.py,sha256=uTzL4o9tJRao4u-gJOFcACgWGkBOtqACmb6ihvCErL8,4694
150
- sunholo-0.101.10.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
151
- sunholo-0.101.10.dist-info/METADATA,sha256=v2uIK5DbDPSat2qFF6pyAnJC0ZcU0Wgq7d_50YT919o,8314
152
- sunholo-0.101.10.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
153
- sunholo-0.101.10.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
154
- sunholo-0.101.10.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
155
- sunholo-0.101.10.dist-info/RECORD,,
150
+ sunholo-0.101.12.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
151
+ sunholo-0.101.12.dist-info/METADATA,sha256=h_2izJTdUl4s1xSKwohq96RPsT8Mz-c-0fwkuFBgRKM,8314
152
+ sunholo-0.101.12.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
153
+ sunholo-0.101.12.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
154
+ sunholo-0.101.12.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
155
+ sunholo-0.101.12.dist-info/RECORD,,