sunholo 0.66.18__py3-none-any.whl → 0.66.20__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.
@@ -46,6 +46,7 @@ cache_duration = timedelta(minutes=5) # Cache duration
46
46
 
47
47
  def make_openai_response(user_message, vector_name, answer):
48
48
  response_id = str(uuid.uuid4())
49
+ log.info("openai response: Q: {user_message} to VECTOR_NAME: {vector_name} - A: {answer}")
49
50
  openai_response = {
50
51
  "id": response_id,
51
52
  "object": "chat.completion",
@@ -418,9 +419,10 @@ def register_qna_routes(app, stream_interpreter, vac_interpreter):
418
419
  bot_output = parse_output(bot_output)
419
420
 
420
421
  log.info(f"Bot output: {bot_output}")
421
-
422
- return make_openai_response(user_message, vector_name, bot_output.get('answer', ''))
423
-
422
+ if bot_output:
423
+ return make_openai_response(user_message, vector_name, bot_output.get('answer', ''))
424
+ else:
425
+ return make_openai_response(user_message, vector_name, 'ERROR: could not find an answer')
424
426
 
425
427
  except Exception as err:
426
428
  log.error(f"OpenAI response error: {err}")
sunholo/agents/swagger.py CHANGED
@@ -208,8 +208,8 @@ See more at https://dev.sunholo.com/
208
208
  try:
209
209
  stem = route_vac(vector_name).strip()
210
210
  except ValueError:
211
- stem = f"${{{agent_type.upper()}_BACKEND_URL}}"
212
- log.warning(f"Failed to find URL stem for {vector_name}/{agent_type} - using {stem} instead")
211
+ log.warning(f"Failed to find URL stem for {vector_name}/{agent_type} - skipping")
212
+ continue
213
213
 
214
214
  for method, endpoints in agent_config_paths.items():
215
215
  # controls if get requests are protected or not
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.66.18
3
+ Version: 0.66.20
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.66.18.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.66.20.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -7,13 +7,13 @@ sunholo/agents/langserve.py,sha256=FdhQjorAY2bMn2rpuabNT6bU3uqSKWrl8DjpH3L_V7k,4
7
7
  sunholo/agents/pubsub.py,sha256=5hbbhbBGyVWRpt2sAGC5FEheYH1mCCwVUhZEB1S7vGg,1337
8
8
  sunholo/agents/route.py,sha256=V1HKXTvaNuYgjmT5_QgIQum4O7O0Mw497m6YiMpEzX0,2383
9
9
  sunholo/agents/special_commands.py,sha256=ecD5jrBVXo170sdgPILi0m_m_4nRFEv6qKn5zYEvEK8,6494
10
- sunholo/agents/swagger.py,sha256=93owb98_P2IDH9eEssxpz0Cr6rgMxSZ1p6jRfm56tXU,13683
10
+ sunholo/agents/swagger.py,sha256=u8yVbXE-Ii_10VxXDai-yczfjCYLfaTWMi8rju-J_ZE,13632
11
11
  sunholo/agents/fastapi/__init__.py,sha256=S_pj4_bTUmDGoq_exaREHlOKThi0zTuGT0VZY0YfODQ,88
12
12
  sunholo/agents/fastapi/base.py,sha256=clk76cHbUAvU0OYJrRfCWX_5f0ACbhDsIzYBhI3wyoE,2514
13
13
  sunholo/agents/fastapi/qna_routes.py,sha256=DgK4Btu5XriOC1JaRQ4G_nWEjJfnQ0J5pyLanF6eF1g,3857
14
14
  sunholo/agents/flask/__init__.py,sha256=uqfHNw2Ru3EJ4dJEcbp86h_lkquBQPMxZbjhV_xe3rs,72
15
15
  sunholo/agents/flask/base.py,sha256=FgSaCODyoTtlstJtsqlLPScdgRUtv9_plxftdzHdVFo,809
16
- sunholo/agents/flask/qna_routes.py,sha256=jBcfD1n-aXJhEBkLUKFuKqWx3-s56hodbB-wahqeusw,21411
16
+ sunholo/agents/flask/qna_routes.py,sha256=tEsJRnnGoz_cOEaPtPpCCD920jZpLypLK58UzIxe1Ac,21659
17
17
  sunholo/archive/__init__.py,sha256=qNHWm5rGPVOlxZBZCpA1wTYPbalizRT7f8X4rs2t290,31
18
18
  sunholo/archive/archive.py,sha256=C-UhG5x-XtZ8VheQp92IYJqgD0V3NFQjniqlit94t18,1197
19
19
  sunholo/auth/__init__.py,sha256=4owDjSaWYkbTlPK47UHTOC0gCWbZsqn4ZIEw5NWZTlg,28
@@ -104,9 +104,9 @@ sunholo/vertex/__init__.py,sha256=JvHcGFuv6R_nAhY2AdoqqhMpJ5ugeWPZ_svGhWrObBk,13
104
104
  sunholo/vertex/init.py,sha256=JDMUaBRdednzbKF-5p33qqLit2LMsvgvWW-NRz0AqO0,1801
105
105
  sunholo/vertex/memory_tools.py,sha256=8F1iTWnqEK9mX4W5RzCVKIjydIcNp6OFxjn_dtQ3GXo,5379
106
106
  sunholo/vertex/safety.py,sha256=3meAX0HyGZYrH7rXPUAHxtI_3w_zoy_RX7Shtkoa660,1275
107
- sunholo-0.66.18.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
108
- sunholo-0.66.18.dist-info/METADATA,sha256=gBAjMviSvrGT2nk1kCGL86_otPXj8SbSAoFS0_pSJjY,6098
109
- sunholo-0.66.18.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
110
- sunholo-0.66.18.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
111
- sunholo-0.66.18.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
112
- sunholo-0.66.18.dist-info/RECORD,,
107
+ sunholo-0.66.20.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
108
+ sunholo-0.66.20.dist-info/METADATA,sha256=r79Ou6tg9lOYgzm0HJEppVuaLiqaNaKky1jm3NLNkMw,6098
109
+ sunholo-0.66.20.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
110
+ sunholo-0.66.20.dist-info/entry_points.txt,sha256=bZuN5AIHingMPt4Ro1b_T-FnQvZ3teBes-3OyO0asl4,49
111
+ sunholo-0.66.20.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
112
+ sunholo-0.66.20.dist-info/RECORD,,