sunholo 0.55.14__py3-none-any.whl → 0.55.15__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.
@@ -71,7 +71,7 @@ def register_qna_routes(app, stream_interpreter, vac_interpreter):
71
71
  wait_time=all_input["stream_wait_time"],
72
72
  timeout=all_input["stream_timeout"],
73
73
  #kwargs
74
- message_author=all_input["message_author"]
74
+ **all_input["kwargs"]
75
75
  ):
76
76
  if isinstance(chunk, dict) and 'answer' in chunk:
77
77
  # When we encounter the dictionary, we yield it as a JSON string
@@ -98,6 +98,7 @@ def register_qna_routes(app, stream_interpreter, vac_interpreter):
98
98
  response = Response(generate_response_content(), content_type='text/plain; charset=utf-8')
99
99
  response.headers['Transfer-Encoding'] = 'chunked'
100
100
 
101
+ log.debug(f"streaming response: {response}")
101
102
  if trace:
102
103
  generation.end(output=response)
103
104
  span.end(output=response)
@@ -133,7 +134,7 @@ def register_qna_routes(app, stream_interpreter, vac_interpreter):
133
134
  question=all_input["user_input"],
134
135
  vector_name=vector_name,
135
136
  chat_history=all_input["chat_history"],
136
- message_author=all_input["message_author"]
137
+ **all_input["kwargs"]
137
138
  )
138
139
  if generation:
139
140
  generation.end(output=bot_output)
@@ -200,18 +201,18 @@ def prep_vac(request, vector_name):
200
201
  if trace:
201
202
  trace.update(input=data, metadata=vac_config)
202
203
 
203
- user_input = data['user_input'].strip()
204
- message_author = data.get('message_author', None)
205
- stream_wait_time = data.get('stream_wait_time', 7)
206
- stream_timeout = data.get('stream_timeout', 120)
204
+ user_input = data.pop('user_input').strip()
205
+ stream_wait_time = data.pop('stream_wait_time', 7)
206
+ stream_timeout = data.pop('stream_timeout', 120)
207
+ chat_history = data.pop('chat_history', None)
208
+ paired_messages = extract_chat_history(chat_history)
207
209
 
208
- paired_messages = extract_chat_history(data.get('chat_history', None))
209
210
  all_input = {'user_input': user_input,
210
211
  'vector_name': vector_name,
211
212
  'chat_history': paired_messages,
212
- 'message_author': message_author,
213
213
  'stream_wait_time': stream_wait_time,
214
- 'stream_timeout':stream_timeout}
214
+ 'stream_timeout':stream_timeout,
215
+ 'kwargs': data}
215
216
 
216
217
  if trace:
217
218
  span = trace.span(
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sunholo
3
- Version: 0.55.14
3
+ Version: 0.55.15
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.55.14.tar.gz
6
+ Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.55.15.tar.gz
7
7
  Author: Holosun ApS
8
8
  Author-email: multivac@sunholo.com
9
9
  License: Apache License, Version 2.0
@@ -13,7 +13,7 @@ sunholo/agents/fastapi/base.py,sha256=clk76cHbUAvU0OYJrRfCWX_5f0ACbhDsIzYBhI3wyo
13
13
  sunholo/agents/fastapi/qna_routes.py,sha256=Xl05L8DjUozGMK7kKPqz7Twr4W56BnLQu_uprsTv_q0,4075
14
14
  sunholo/agents/flask/__init__.py,sha256=uqfHNw2Ru3EJ4dJEcbp86h_lkquBQPMxZbjhV_xe3rs,72
15
15
  sunholo/agents/flask/base.py,sha256=RUGWBYWeV60FatYF5sMRrxD-INU97Vodsi6JaB6i93s,763
16
- sunholo/agents/flask/qna_routes.py,sha256=iSAtyVfLjlYB8t4gcl_H8NeaWRNgeGmT6N7BQc3KxP8,8810
16
+ sunholo/agents/flask/qna_routes.py,sha256=A_L9w966Pb_MZSh17gcu5HxmzJdiclKaKTZ0ARaSRjg,8785
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
@@ -81,8 +81,8 @@ sunholo/utils/__init__.py,sha256=MxuxoJ-oOie_skGnB4mOagVYjzvfmX9Gz9N5heI8azM,62
81
81
  sunholo/utils/config.py,sha256=KYuhwmhYS7qOpt2ZcpAWnlHPJ9rBDX1SgP8gnjkAW6E,7321
82
82
  sunholo/utils/gcp.py,sha256=B2G1YKjeD7X9dqO86Jrp2vPuFwZ223Xl5Tg09Ndw-oc,5760
83
83
  sunholo/utils/parsers.py,sha256=E-M7s3_rPviT5zCqQHzhb1DwYmz5a1J472ZVazx10M8,3400
84
- sunholo-0.55.14.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
85
- sunholo-0.55.14.dist-info/METADATA,sha256=DpUO8-sBmesr9sgBFebRAMF-f1UoqAgvXK2Db4xzFlg,6434
86
- sunholo-0.55.14.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
87
- sunholo-0.55.14.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
88
- sunholo-0.55.14.dist-info/RECORD,,
84
+ sunholo-0.55.15.dist-info/LICENSE.txt,sha256=SdE3QjnD3GEmqqg9EX3TM9f7WmtOzqS1KJve8rhbYmU,11345
85
+ sunholo-0.55.15.dist-info/METADATA,sha256=rCF_1oWdOx8Zvn9HZA3E5JZKZXBSvM05F1tX8Q1jheA,6434
86
+ sunholo-0.55.15.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
87
+ sunholo-0.55.15.dist-info/top_level.txt,sha256=wt5tadn5--5JrZsjJz2LceoUvcrIvxjHJe-RxuudxAk,8
88
+ sunholo-0.55.15.dist-info/RECORD,,