sunholo 0.97.7__py3-none-any.whl → 0.97.9__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.
sunholo/components/llm.py CHANGED
@@ -13,6 +13,7 @@
13
13
  # limitations under the License.
14
14
  from ..custom_logging import log
15
15
  from ..utils import load_config_key, ConfigManager
16
+ from ..utils.gcp_project import get_gcp_project
16
17
 
17
18
  import os
18
19
 
@@ -102,8 +103,8 @@ def llm_str_to_llm(llm_str, model=None, vector_name=None, config=None):
102
103
  from langchain_google_vertexai.model_garden import ChatAnthropicVertex
103
104
  gcp_config = config.vacConfig("gcp_config")
104
105
  return ChatAnthropicVertex(model_name=model,
105
- project=gcp_config.get('project_id'),
106
- location=gcp_config.get('location'))
106
+ project=gcp_config.get('project_id') or get_gcp_project(),
107
+ location=gcp_config.get('location') or "europe-west1")
107
108
 
108
109
  from langchain_google_vertexai import VertexAI
109
110
  return VertexAI(model_name = model, temperature=0, max_output_tokens=1024)
@@ -185,8 +186,8 @@ def get_llm_chat(vector_name:str=None, model=None, config:ConfigManager=None):
185
186
  from langchain_google_vertexai.model_garden import ChatAnthropicVertex
186
187
  gcp_config = config.vacConfig("gcp_config")
187
188
  return ChatAnthropicVertex(model_name=model,
188
- project=gcp_config.get('project_id'),
189
- location=gcp_config.get('location'))
189
+ project=gcp_config.get('project_id') or get_gcp_project(),
190
+ location=gcp_config.get('location') or "europe-west1")
190
191
 
191
192
  return ChatVertexAI(model_name = model, temperature=0, max_output_tokens=1024)
192
193
 
@@ -473,7 +473,7 @@ class GenAIFunctionProcessor:
473
473
  log.warning(f"{fn_result_json} did not work for decide_to_go_on")
474
474
  token = f"Error calling decide_to_go_on with {fn_result_json}\n"
475
475
  else:
476
- token = f"--- {fn}() result --- \n"
476
+ token = f"--- {fn_log} result --- \n"
477
477
  if fn_result_json:
478
478
  if fn_result_json.get('stdout'):
479
479
  text = fn_result_json.get('stdout').encode('utf-8').decode('unicode_escape')
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.97.7
3
+ Version: 0.97.9
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.97.7.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.97.9.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -54,7 +54,7 @@ sunholo/cli/sun_rich.py,sha256=UpMqeJ0C8i0pkue1AHnnyyX0bFJ9zZeJ7HBR6yhuA8A,54
54
54
  sunholo/cli/swagger.py,sha256=absYKAU-7Yd2eiVNUY-g_WLl2zJfeRUNdWQ0oH8M_HM,1564
55
55
  sunholo/cli/vertex.py,sha256=8130YCarxHL1UC3aqblNmUwGZTXbkdL4Y_FOnZJsWiI,2056
56
56
  sunholo/components/__init__.py,sha256=IDoylb74zFKo6NIS3RQqUl0PDFBGVxM1dfUmO7OJ44U,176
57
- sunholo/components/llm.py,sha256=Y6fx8CzlF-BpPN1kQFllbX7u0wx6zhQVPIjrNLFhE7E,12814
57
+ sunholo/components/llm.py,sha256=FIlJcbTXzPx1I9fEKxQEpW8hCH5UEH2QrSP6A2kk9no,12940
58
58
  sunholo/components/retriever.py,sha256=bKIVT7_18Ut3OJd0E0jyiISPnD9qkHWVjcQPT4i1_G8,7720
59
59
  sunholo/components/vectorstore.py,sha256=xKk7micTRwZckaI7U6PxvFz_ZSjCH48xPTDYiDcv2tc,5913
60
60
  sunholo/database/__init__.py,sha256=bpB5Nk21kwqYj-qdVnvNgXjLsbflnH4g-San7OHMqR4,283
@@ -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=M6vE_-Mi8v1Od8iny3h9-pRA5KbO5n4hiJKr1yPN9BU,24360
89
+ sunholo/genai/process_funcs_cls.py,sha256=sFM5WxzZW02H9FC80ZZ_fcTv2OBRwuueeR7JoWPuM78,24362
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.97.7.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
- sunholo-0.97.7.dist-info/METADATA,sha256=QENxb989_5Ei7ODsH6UH6TrE5wqgiqR3asNeyljIIRo,8310
149
- sunholo-0.97.7.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
150
- sunholo-0.97.7.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
- sunholo-0.97.7.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
- sunholo-0.97.7.dist-info/RECORD,,
147
+ sunholo-0.97.9.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
+ sunholo-0.97.9.dist-info/METADATA,sha256=trl4iJIy-iWhjAerCpPzPgTQnCg_ZToC1Q137VXVULo,8310
149
+ sunholo-0.97.9.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
150
+ sunholo-0.97.9.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
+ sunholo-0.97.9.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
+ sunholo-0.97.9.dist-info/RECORD,,