sunholo 0.97.9__py3-none-any.whl → 0.98.0__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 +4 -4
- sunholo/database/alloydb_client.py +8 -0
- {sunholo-0.97.9.dist-info → sunholo-0.98.0.dist-info}/METADATA +2 -2
- {sunholo-0.97.9.dist-info → sunholo-0.98.0.dist-info}/RECORD +8 -8
- {sunholo-0.97.9.dist-info → sunholo-0.98.0.dist-info}/LICENSE.txt +0 -0
- {sunholo-0.97.9.dist-info → sunholo-0.98.0.dist-info}/WHEEL +0 -0
- {sunholo-0.97.9.dist-info → sunholo-0.98.0.dist-info}/entry_points.txt +0 -0
- {sunholo-0.97.9.dist-info → sunholo-0.98.0.dist-info}/top_level.txt +0 -0
sunholo/components/llm.py
CHANGED
|
@@ -103,8 +103,8 @@ def llm_str_to_llm(llm_str, model=None, vector_name=None, config=None):
|
|
|
103
103
|
from langchain_google_vertexai.model_garden import ChatAnthropicVertex
|
|
104
104
|
gcp_config = config.vacConfig("gcp_config")
|
|
105
105
|
return ChatAnthropicVertex(model_name=model,
|
|
106
|
-
project=gcp_config.get('project_id')
|
|
107
|
-
location=gcp_config.get('location')
|
|
106
|
+
project=gcp_config.get('project_id') if gcp_config else get_gcp_project(),
|
|
107
|
+
location=gcp_config.get('location') if gcp_config else "europe-west1")
|
|
108
108
|
|
|
109
109
|
from langchain_google_vertexai import VertexAI
|
|
110
110
|
return VertexAI(model_name = model, temperature=0, max_output_tokens=1024)
|
|
@@ -186,8 +186,8 @@ def get_llm_chat(vector_name:str=None, model=None, config:ConfigManager=None):
|
|
|
186
186
|
from langchain_google_vertexai.model_garden import ChatAnthropicVertex
|
|
187
187
|
gcp_config = config.vacConfig("gcp_config")
|
|
188
188
|
return ChatAnthropicVertex(model_name=model,
|
|
189
|
-
project=gcp_config.get('project_id')
|
|
190
|
-
location=gcp_config.get('location')
|
|
189
|
+
project=gcp_config.get('project_id') if gcp_config else get_gcp_project(),
|
|
190
|
+
location=gcp_config.get('location') if gcp_config else "europe-west1")
|
|
191
191
|
|
|
192
192
|
return ChatVertexAI(model_name = model, temperature=0, max_output_tokens=1024)
|
|
193
193
|
|
|
@@ -195,6 +195,14 @@ class AlloyDBClient:
|
|
|
195
195
|
vector_name=vector_name)
|
|
196
196
|
|
|
197
197
|
return await self.vectorstore.asimilarity_search(query, filter=source_filter_cmd, k=k)
|
|
198
|
+
|
|
199
|
+
def create_index(self, vectorstore=None):
|
|
200
|
+
from langchain_google_alloydb_pg.indexes import IVFFlatIndex
|
|
201
|
+
index = IVFFlatIndex()
|
|
202
|
+
vs = vectorstore or self.vectorstore
|
|
203
|
+
|
|
204
|
+
return vs.apply_vector_index(index)
|
|
205
|
+
|
|
198
206
|
|
|
199
207
|
def execute_sql(self, sql_statement):
|
|
200
208
|
log.info(f"Executing sync SQL statement: {sql_statement}")
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.98.0
|
|
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.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.98.0.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -54,12 +54,12 @@ 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=
|
|
57
|
+
sunholo/components/llm.py,sha256=8iyY6K1ZiiJx9MGL1fY5CHh8CD3YYhwEA6O8B44tkxE,13004
|
|
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
|
|
61
61
|
sunholo/database/alloydb.py,sha256=YH8wNPS8gN-TDZEXQcVHxwd1NScHRfAxma3gK4R6KCk,11740
|
|
62
|
-
sunholo/database/alloydb_client.py,sha256=
|
|
62
|
+
sunholo/database/alloydb_client.py,sha256=EP0awyNOjwW18sTpRbLqwD_QZYiPKZz5NchJIpYvzmI,18555
|
|
63
63
|
sunholo/database/database.py,sha256=VqhZdkXUNdvWn8sUcUV3YNby1JDVf7IykPVXWBtxo9U,7361
|
|
64
64
|
sunholo/database/lancedb.py,sha256=DyfZntiFKBlVPaFooNN1Z6Pl-LAs4nxWKKuq8GBqN58,715
|
|
65
65
|
sunholo/database/static_dbs.py,sha256=8cvcMwUK6c32AS2e_WguKXWMkFf5iN3g9WHzsh0C07Q,442
|
|
@@ -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.
|
|
148
|
-
sunholo-0.
|
|
149
|
-
sunholo-0.
|
|
150
|
-
sunholo-0.
|
|
151
|
-
sunholo-0.
|
|
152
|
-
sunholo-0.
|
|
147
|
+
sunholo-0.98.0.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
|
|
148
|
+
sunholo-0.98.0.dist-info/METADATA,sha256=gq5z4QNr3JpzAPrrBBNumkbp4FfGQPpq4571wX2Sxbs,8310
|
|
149
|
+
sunholo-0.98.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
150
|
+
sunholo-0.98.0.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
|
|
151
|
+
sunholo-0.98.0.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
|
|
152
|
+
sunholo-0.98.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|