sunholo 0.105.6__py3-none-any.whl → 0.105.8__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.
@@ -512,28 +512,29 @@ class GenAIFunctionProcessor:
512
512
  gen.end(output=response.to_dict()) if gen else None
513
513
  else:
514
514
  gen.end(output="No response received") if gen else None
515
-
516
515
 
517
- for chunk in response:
518
- if not chunk:
519
- continue
516
+ if not response:
517
+ response = []
518
+ for chunk in response:
519
+ if not chunk:
520
+ continue
520
521
 
521
- log.debug(f"[{guardrail}] {chunk=}")
522
- try:
523
- if hasattr(chunk, 'text') and isinstance(chunk.text, str):
524
- token = chunk.text
525
- token_queue.append(token)
526
- this_text += token
527
- else:
528
- log.info("skipping chunk with no text")
529
-
530
- except ValueError as err:
531
- token_queue.append(f"{str(err)} for {chunk=}")
522
+ log.debug(f"[{guardrail}] {chunk=}")
532
523
  try:
533
- executed_responses = self.process_funcs(response, loop_span=loop_span)
534
- except Exception as err:
535
- log.error(f"Error in executions: {str(err)}")
536
- token_queue.append(f"{str(err)} for {response=}")
524
+ if hasattr(chunk, 'text') and isinstance(chunk.text, str):
525
+ token = chunk.text
526
+ token_queue.append(token)
527
+ this_text += token
528
+ else:
529
+ log.info("skipping chunk with no text")
530
+
531
+ except ValueError as err:
532
+ token_queue.append(f"{str(err)} for {chunk=}")
533
+ try:
534
+ executed_responses = self.process_funcs(response, loop_span=loop_span)
535
+ except Exception as err:
536
+ log.error(f"Error in executions: {str(err)}")
537
+ token_queue.append(f"{str(err)} for {response=}")
537
538
 
538
539
  log.info(f"[{guardrail}] {executed_responses=}")
539
540
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.105.6
3
+ Version: 0.105.8
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.105.6.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.105.8.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=EyjsDqt6XQw99pZUQamomCpMOoIah9bp3XY94WPU7Ms,1678
90
90
  sunholo/genai/init.py,sha256=yG8E67TduFCTQPELo83OJuWfjwTnGZsyACospahyEaY,687
91
- sunholo/genai/process_funcs_cls.py,sha256=_vyFOqGvHR9846ahNwj3Gl7kbYhsliCkVvI6ou925QQ,31608
91
+ sunholo/genai/process_funcs_cls.py,sha256=SnonJh4CqvJFSSvlwDJK6tqXbaYF_651IopCl37ZVOs,31578
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
@@ -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.105.6.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
151
- sunholo-0.105.6.dist-info/METADATA,sha256=n2sxhg0ilHv5x2OBEgBOSqADhdtUv9CNw2T4J1NJvoY,8312
152
- sunholo-0.105.6.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
153
- sunholo-0.105.6.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
154
- sunholo-0.105.6.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
155
- sunholo-0.105.6.dist-info/RECORD,,
150
+ sunholo-0.105.8.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
151
+ sunholo-0.105.8.dist-info/METADATA,sha256=QYG1Tm97SYn07_IJGWxlBdsFTqBkFyXu9ffDi2RZOAs,8312
152
+ sunholo-0.105.8.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
153
+ sunholo-0.105.8.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
154
+ sunholo-0.105.8.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
155
+ sunholo-0.105.8.dist-info/RECORD,,