sunholo 0.97.8__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
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.97.8
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.8.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
@@ -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.8.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
- sunholo-0.97.8.dist-info/METADATA,sha256=8X9gqGvwFZunwIIKFA5A06i958aHKkJoZjI-y3heShQ,8310
149
- sunholo-0.97.8.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
150
- sunholo-0.97.8.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
- sunholo-0.97.8.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
- sunholo-0.97.8.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,,