sunholo 0.105.5__py3-none-any.whl → 0.105.7__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,27 @@ 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
+ for chunk in response:
517
+ if not chunk:
518
+ continue
520
519
 
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=}")
520
+ log.debug(f"[{guardrail}] {chunk=}")
532
521
  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=}")
522
+ if hasattr(chunk, 'text') and isinstance(chunk.text, str):
523
+ token = chunk.text
524
+ token_queue.append(token)
525
+ this_text += token
526
+ else:
527
+ log.info("skipping chunk with no text")
528
+
529
+ except ValueError as err:
530
+ token_queue.append(f"{str(err)} for {chunk=}")
531
+ try:
532
+ executed_responses = self.process_funcs(response, loop_span=loop_span)
533
+ except Exception as err:
534
+ log.error(f"Error in executions: {str(err)}")
535
+ token_queue.append(f"{str(err)} for {response=}")
537
536
 
538
537
  log.info(f"[{guardrail}] {executed_responses=}")
539
538
 
@@ -609,14 +608,13 @@ class GenAIFunctionProcessor:
609
608
  this_text += token
610
609
  token_queue.append(token)
611
610
  fn_exec_one.end(output=token) if fn_exec_one else None
612
-
611
+ fn_exec.end(output=this_text) if fn_exec else None
612
+
613
613
  else:
614
614
  token = "\nNo function executions were found\n"
615
615
  token_queue.append(token)
616
616
  this_text += token
617
617
 
618
- fn_exec.end(output=this_text) if fn_exec else None
619
-
620
618
  if this_text:
621
619
  content.append(f"Agent: {this_text}")
622
620
  # if text includes gs:// try to download it
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.105.5
3
+ Version: 0.105.7
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.5.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.105.7.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=OVSrSmeEhCvfEAtpVKhrwpgc_UJLHy6948Zz1fnE0lk,31617
91
+ sunholo/genai/process_funcs_cls.py,sha256=W8tRd3-vY35QpTsv0eci0dgxu3HIzC1a4q7ftmtLd3Q,31519
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.5.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
151
- sunholo-0.105.5.dist-info/METADATA,sha256=h66mRPiUU9v8mcO8Kn0hrl7S3SaiO3YGmHGxHPkXIWg,8312
152
- sunholo-0.105.5.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
153
- sunholo-0.105.5.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
154
- sunholo-0.105.5.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
155
- sunholo-0.105.5.dist-info/RECORD,,
150
+ sunholo-0.105.7.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
151
+ sunholo-0.105.7.dist-info/METADATA,sha256=D3lx9JQlzvwdXUbXPEoSUihz7gkiEiGsPIn_1M8s6lY,8312
152
+ sunholo-0.105.7.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
153
+ sunholo-0.105.7.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
154
+ sunholo-0.105.7.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
155
+ sunholo-0.105.7.dist-info/RECORD,,