sunholo 0.112.4__py3-none-any.whl → 0.112.5__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.
@@ -162,7 +162,7 @@ def read_url_to_document(url: str, metadata: dict = None):
162
162
 
163
163
  if not UnstructuredLoader:
164
164
  raise ImportError("UnstructuredLoader requires 'langchain_unstructured' to be installed")
165
- unstructured_kwargs = {"pdf_infer_table_structure": True,
165
+ unstructured_kwargs = {"skip_infer_table_types": [],
166
166
  "extract_image_block_types": ["Image", "Table"]
167
167
  }
168
168
  loader = UnstructuredLoader(web_url=url, mode="elements", unstructured_kwargs=unstructured_kwargs)
@@ -477,10 +477,10 @@ class GenAIFunctionProcessor:
477
477
 
478
478
  response: GenerateContentResponse = chat.send_message(content, request_options=RequestOptions(
479
479
  retry=retry.Retry(
480
- initial=10,
480
+ initial=1,
481
481
  multiplier=2,
482
- maximum=60,
483
- timeout=90
482
+ maximum=10,
483
+ timeout=60
484
484
  )
485
485
  ))
486
486
  except RetryError as err:
@@ -490,8 +490,10 @@ class GenAIFunctionProcessor:
490
490
  this_text += msg
491
491
 
492
492
  except Exception as e:
493
- msg = f"Error sending {content} to model: {str(e)} - {traceback.format_exc()}"
494
- log.error(msg)
493
+ msg = f"Error sending {content} to model: {str(e)}"
494
+ if str(e) == "finish_reason: 10":
495
+ msg = "The Gemini API does not work with this input - you need to try something else. Error is: finish_reason: 10"
496
+ log.error(msg + f"{traceback.format_exc()}")
495
497
  token_queue.append(msg)
496
498
  this_text += msg
497
499
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.112.4
3
+ Version: 0.112.5
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.112.4.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.112.5.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -34,7 +34,7 @@ sunholo/chunker/azure.py,sha256=MVF9_-QdKUoJqlpEJ49pv2sdjMDxEiMNxzmO7w5nWDQ,3270
34
34
  sunholo/chunker/doc_handling.py,sha256=UAf9BmUMpKCKRlAMl1qNZK6xDNYWk1z3ARoftWoa_54,8734
35
35
  sunholo/chunker/encode_metadata.py,sha256=hxxd9KU35Xi0Z_EL8kt_oD66pKfBLhEjBImC16ew-Eo,1919
36
36
  sunholo/chunker/images.py,sha256=id2PBu6XyGEOtgafq2v0c9_O6kxaC_pYFMnbsIitkSg,1868
37
- sunholo/chunker/loaders.py,sha256=BNxNwDPZz7lQnz2afhFx3mBZL6hc3xicjw-g6aKyqTE,10719
37
+ sunholo/chunker/loaders.py,sha256=7FMbiRuAg8dpTO1PCAW918eYsP6NNxnS26FrONjH_So,10714
38
38
  sunholo/chunker/message_data.py,sha256=EaiY7_HClpcfPUAYaAm6Zk5ReeZ9s9F_jBVd0kDgI-4,10836
39
39
  sunholo/chunker/pdfs.py,sha256=njDPop751GMHi3cOwIKd2Yct-_lWR2gqcB7WykfHphs,2480
40
40
  sunholo/chunker/process_chunker_data.py,sha256=uO-YOEHIjAOy0ZMJ0vea9OMNsQBISHfhbtgoyuHiP6s,3598
@@ -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=7_RQMqIAZ3nPP-GFgCHBvS39fwuWuGtvSyuJaJN_G3E,31590
92
+ sunholo/genai/process_funcs_cls.py,sha256=iUVLI3TBkCM3cgfWsXp72OAolxOlBAVSly5jMmIEvGA,31777
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.112.4.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
154
- sunholo-0.112.4.dist-info/METADATA,sha256=ssEWL3k24zUyIGPRiSbT21EbqhPuG-WCiWFJMBbxGXw,8786
155
- sunholo-0.112.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
156
- sunholo-0.112.4.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
157
- sunholo-0.112.4.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
158
- sunholo-0.112.4.dist-info/RECORD,,
153
+ sunholo-0.112.5.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
154
+ sunholo-0.112.5.dist-info/METADATA,sha256=POaSTQJSKDg52xtgwo66xh0jMfQyXzG4RM9K_-vsU48,8786
155
+ sunholo-0.112.5.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
156
+ sunholo-0.112.5.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
157
+ sunholo-0.112.5.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
158
+ sunholo-0.112.5.dist-info/RECORD,,