sunholo 0.96.1__py3-none-any.whl → 0.96.3__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.
@@ -17,7 +17,7 @@ from ..auth import get_header
17
17
  import requests
18
18
  import aiohttp
19
19
  from .langserve import prepare_request_data
20
-
20
+ import traceback
21
21
  from .route import route_endpoint
22
22
 
23
23
  try:
@@ -149,7 +149,7 @@ def send_to_qa(user_input, vector_name, chat_history, stream=False, **kwargs):
149
149
  return {"answer": error_message}
150
150
 
151
151
  except Exception as err:
152
- log.error(f"Other error occurred: {str(err)}")
152
+ log.error(f"Other error occurred: {str(err)} {traceback.format_exc()}")
153
153
  error_message = f"Something went wrong. {str(err)}"
154
154
  if stream:
155
155
  return iter([error_message])
sunholo/auth/run.py CHANGED
@@ -53,24 +53,26 @@ def get_cloud_run_token(vector_name):
53
53
  config = ConfigManager(vector_name)
54
54
  run_url = get_run_url(config)
55
55
 
56
+
57
+ # this logging can cause issues so only active when debugging
56
58
  # Append ID Token to make authenticated requests to Cloud Run services
57
- frame = inspect.currentframe()
58
- caller_frame = frame.f_back if frame is not None else None # One level up in the stack
59
- deets = {
60
- 'message': 'Authenticating for run_url',
61
- 'run_url': run_url
62
- }
63
- if caller_frame:
64
- deets = {
65
- 'message': 'Authenticating for run_url',
66
- 'file': caller_frame.f_code.co_filename,
67
- 'line': str(caller_frame.f_lineno),
68
- 'function': caller_frame.f_code.co_name,
69
- 'run_url': run_url
70
- }
71
- log.info(f"Authenticating for run_url {run_url} from {caller_frame.f_code.co_name}")
59
+ #frame = inspect.currentframe()
60
+ #caller_frame = frame.f_back if frame is not None else None # One level up in the stack
61
+ #deets = {
62
+ # 'message': 'Authenticating for run_url',
63
+ # 'run_url': run_url
64
+ #}
65
+ #if caller_frame:
66
+ # deets = {
67
+ # 'message': 'Authenticating for run_url',
68
+ # 'file': caller_frame.f_code.co_filename,
69
+ # 'line': str(caller_frame.f_lineno),
70
+ # 'function': caller_frame.f_code.co_name,
71
+ # 'run_url': run_url
72
+ # }
73
+ #log.info(f"Authenticating for run_url {run_url} from {caller_frame.f_code.co_name}")
74
+
72
75
  id_token = get_id_token(run_url)
73
- #log.info(f"id_token {id_token}")
74
76
  return id_token
75
77
 
76
78
  def get_header(vector_name) -> Optional[dict]:
@@ -280,7 +280,7 @@ class AlloyDBClient:
280
280
  query = f"""
281
281
  SELECT page_content, source, langchain_metadata, images_gsurls, doc_id::text as doc_id
282
282
  FROM "{table_name}"
283
- WHERE source = '{source}'
283
+ WHERE source ILIKE '%{source}%'
284
284
  LIMIT 500;
285
285
  """
286
286
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.96.1
3
+ Version: 0.96.3
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.96.1.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.96.3.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -2,7 +2,7 @@ sunholo/__init__.py,sha256=lLuVyilzmDbTaiAptR8SZzpbUNsgwHFsp4Ejbr5EApI,1136
2
2
  sunholo/custom_logging.py,sha256=YfIN1oP3dOEkkYkyRBU8BGS3uJFGwUDsFCl8mIVbwvE,12225
3
3
  sunholo/agents/__init__.py,sha256=X2I3pPkGeKWjc3d0QgSpkTyqD8J8JtrEWqwrumf1MMc,391
4
4
  sunholo/agents/chat_history.py,sha256=Gph_CdlP2otYnNdR1q1Umyyyvcad2F6K3LxU5yBQ9l0,5387
5
- sunholo/agents/dispatch_to_qa.py,sha256=Z2q0ygYxfgBr-EGydq_H5y4Y-bKlY4ZCBCwkGpYwjFY,8766
5
+ sunholo/agents/dispatch_to_qa.py,sha256=i9HeKy-ovH54ZM51jbv1Q89GnXdBf6nvNAwsiNhJQsQ,8807
6
6
  sunholo/agents/langserve.py,sha256=C46ph2mnygr6bdHijYWYyfQDI9ylAF0_9Kx2PfcCJpU,4414
7
7
  sunholo/agents/pubsub.py,sha256=TscZN_6am6DfaQkC-Yl18ZIBOoLE-0nDSiil6GpQEh4,1344
8
8
  sunholo/agents/route.py,sha256=mV8tGABbSqcg3PQL02MgQOs41gKEHLMyIJJJcTuFdbE,2988
@@ -20,7 +20,7 @@ sunholo/archive/archive.py,sha256=PxVfDtO2_2ZEEbnhXSCbXLdeoHoQVImo4y3Jr2XkCFY,12
20
20
  sunholo/auth/__init__.py,sha256=TeP-OY0XGxYV_8AQcVGoh35bvyWhNUcMRfhuD5l44Sk,91
21
21
  sunholo/auth/gcloud.py,sha256=PdbwkuTdRi4RKBmgG9uwsReegqC4VG15_tw5uzmA7Fs,298
22
22
  sunholo/auth/refresh.py,sha256=6AEWX87G3I9BCqrgGJjHGrrWABBXHuaGDKU9ZEcVeXM,2017
23
- sunholo/auth/run.py,sha256=zZWRIxfG93eZMCE-feiHRQTLMcHz4U6-yseGgZfu1LI,2776
23
+ sunholo/auth/run.py,sha256=pMSp2lzL6e6ZqlltVUH92bkeUt341yMue027qrE0jQU,2821
24
24
  sunholo/azure/__init__.py,sha256=S1WQ5jndzNgzhSBh9UpX_yw7hRVm3hCzkAWNxUdK4dA,48
25
25
  sunholo/azure/auth.py,sha256=Y3fDqFLYwbsIyi5hS5L-3hYnwrLWVL96yPng5Sj5c2c,2236
26
26
  sunholo/azure/blobs.py,sha256=FkX9DutUctWvlk1GjUhtqVUAZZLTLJyy3Tmyvk86VPM,1404
@@ -59,7 +59,7 @@ sunholo/components/retriever.py,sha256=bKIVT7_18Ut3OJd0E0jyiISPnD9qkHWVjcQPT4i1_
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=pD3aVT_UWEtcT8Ma1glyj6QEWHRqbNKJNKe3oau_0HA,18304
62
+ sunholo/database/alloydb_client.py,sha256=bvQzvnLEYGrmOgTBx7QjgIn_-4N4aN8JNRUNOLNSRc8,18310
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=ZirFbS7EKxQaoRmOrb4BnG6jPJ83wt43N8M4zTVbutU,7717
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.96.1.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
- sunholo-0.96.1.dist-info/METADATA,sha256=qT2To6zmbxFvWhNL8-6tsh3GoPcvLq1FOirMA6iuQNc,7889
149
- sunholo-0.96.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
150
- sunholo-0.96.1.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
- sunholo-0.96.1.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
- sunholo-0.96.1.dist-info/RECORD,,
147
+ sunholo-0.96.3.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
+ sunholo-0.96.3.dist-info/METADATA,sha256=ImCGkUyn12lKQJHIqYr5u-jJqqDgWUoRjy8hMNExONA,7889
149
+ sunholo-0.96.3.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
150
+ sunholo-0.96.3.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
+ sunholo-0.96.3.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
+ sunholo-0.96.3.dist-info/RECORD,,