sunholo 0.96.0__py3-none-any.whl → 0.96.2__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]:
sunholo/langfuse/evals.py CHANGED
@@ -97,7 +97,7 @@ def do_evals(trace_id, eval_funcs: list=[eval_length], **kwargs) -> dict:
97
97
  # Submit the evaluation to Langfuse
98
98
  langfuse.score(
99
99
  trace_id=trace.id,
100
- name=eval_name, # Use the function name as the evaluation name
100
+ name=eval_result.get("name") or eval_name, # Use the function name as the evaluation name or 'name' key if present
101
101
  value=eval_result["score"],
102
102
  comment=eval_result["reason"],
103
103
  **kwargs
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.96.0
3
+ Version: 0.96.2
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.0.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.96.2.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
@@ -94,7 +94,7 @@ sunholo/invoke/direct_vac_func.py,sha256=fuTJlH5PsqWhN_yVMaWisHCTZU1JEUz8I8yVbWs
94
94
  sunholo/invoke/invoke_vac_utils.py,sha256=sJc1edHTHMzMGXjji1N67c3iUaP7BmAL5nj82Qof63M,2053
95
95
  sunholo/langfuse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
96
  sunholo/langfuse/callback.py,sha256=jl0SZsFS53uMW9DGeM9SOL_EsRZsba0wwFGLqKzu9_U,1684
97
- sunholo/langfuse/evals.py,sha256=MNV3YaZ0b46WcuGZaurSVitWpFpbNaceiB47A2Zynjg,3789
97
+ sunholo/langfuse/evals.py,sha256=fQBaC0dBTYfgCzyfv9QBRvUfc9f42lbwQAeZmynaHO8,3841
98
98
  sunholo/langfuse/prompts.py,sha256=27BsVfihM6-h1jscbkGSO4HsATl-d4ZN6tcNCVztWoY,1300
99
99
  sunholo/llamaindex/__init__.py,sha256=DlY_cHWCsVEV1C5WBgDdHRgOMlJc8pDoCRukUJ8PT9w,88
100
100
  sunholo/llamaindex/get_files.py,sha256=6rhXCDqQ_lrIapISQ_OYQDjiSATXvS_9m3qq53-oIl0,781
@@ -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.0.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
- sunholo-0.96.0.dist-info/METADATA,sha256=vNdFJP76HWDA62pJ1med8qqeKi1Cp1IuzDPgjfBZ2-Q,7889
149
- sunholo-0.96.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
150
- sunholo-0.96.0.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
- sunholo-0.96.0.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
- sunholo-0.96.0.dist-info/RECORD,,
147
+ sunholo-0.96.2.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
148
+ sunholo-0.96.2.dist-info/METADATA,sha256=SjGyoQwCjP0t2BgYpsZQAm2d4Ckj3Q9TrJd5WUdTn0I,7889
149
+ sunholo-0.96.2.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
150
+ sunholo-0.96.2.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
151
+ sunholo-0.96.2.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
152
+ sunholo-0.96.2.dist-info/RECORD,,