sunholo 0.64.3__tar.gz → 0.64.4__tar.gz
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-0.64.3 → sunholo-0.64.4}/PKG-INFO +2 -2
- {sunholo-0.64.3 → sunholo-0.64.4}/setup.py +1 -1
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/flask/qna_routes.py +20 -12
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo.egg-info/PKG-INFO +2 -2
- {sunholo-0.64.3 → sunholo-0.64.4}/LICENSE.txt +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/MANIFEST.in +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/README.md +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/setup.cfg +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/chat_history.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/dispatch_to_qa.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/fastapi/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/fastapi/base.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/fastapi/qna_routes.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/flask/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/flask/base.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/langserve.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/pubsub.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/route.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/agents/special_commands.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/archive/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/archive/archive.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/auth/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/auth/run.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/bots/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/bots/discord.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/bots/github_webhook.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/bots/webapp.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/chunker/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/chunker/data_to_embed_pubsub.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/chunker/doc_handling.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/chunker/images.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/chunker/loaders.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/chunker/message_data.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/chunker/pdfs.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/chunker/publish.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/chunker/splitter.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/cli/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/cli/chat_vac.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/cli/cli.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/cli/cli_init.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/cli/configs.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/cli/deploy.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/cli/embedder.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/cli/merge_texts.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/cli/run_proxy.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/cli/sun_rich.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/components/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/components/llm.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/components/retriever.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/components/vectorstore.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/alloydb.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/database.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/lancedb.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/sql/sb/create_function.sql +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/sql/sb/create_function_time.sql +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/sql/sb/create_table.sql +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/sql/sb/delete_source_row.sql +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/sql/sb/return_sources.sql +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/sql/sb/setup.sql +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/static_dbs.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/database/uuid.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/embedder/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/embedder/embed_chunk.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/gcs/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/gcs/add_file.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/gcs/download_url.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/gcs/metadata.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/langfuse/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/langfuse/callback.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/langfuse/prompts.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/llamaindex/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/llamaindex/generate.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/llamaindex/get_files.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/llamaindex/import_files.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/logging.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/lookup/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/lookup/model_lookup.yaml +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/patches/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/patches/langchain/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/patches/langchain/lancedb.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/patches/langchain/vertexai.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/pubsub/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/pubsub/process_pubsub.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/pubsub/pubsub_manager.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/qna/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/qna/parsers.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/qna/retry.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/streaming/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/streaming/content_buffer.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/streaming/langserve.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/streaming/stream_lookup.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/streaming/streaming.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/summarise/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/summarise/summarise.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/utils/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/utils/big_context.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/utils/config.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/utils/config_schema.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/utils/gcp.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/utils/gcp_project.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/utils/parsers.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/utils/timedelta.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/utils/user_ids.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/utils/version.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/vertex/__init__.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/vertex/init.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/vertex/memory_tools.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo/vertex/safety.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo.egg-info/SOURCES.txt +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo.egg-info/dependency_links.txt +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo.egg-info/entry_points.txt +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo.egg-info/requires.txt +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/sunholo.egg-info/top_level.txt +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/tests/test_chat_history.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/tests/test_chunker.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/tests/test_config.py +0 -0
- {sunholo-0.64.3 → sunholo-0.64.4}/tests/test_dispatch_to_qa.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.64.
|
|
3
|
+
Version: 0.64.4
|
|
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.64.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.64.4.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
@@ -165,13 +165,18 @@ def register_qna_routes(app, stream_interpreter, vac_interpreter):
|
|
|
165
165
|
return jsonify(bot_output)
|
|
166
166
|
|
|
167
167
|
@app.route('/openai/v1/chat/completions', methods=['POST'])
|
|
168
|
-
|
|
168
|
+
@app.route('/openai/v1/chat/completions/<vector_name>', methods=['POST'])
|
|
169
|
+
def openai_compatible_endpoint(vector_name=None):
|
|
169
170
|
data = request.get_json()
|
|
170
|
-
|
|
171
|
+
log.info(f'openai_compatible_endpoint got data: {data}')
|
|
172
|
+
|
|
173
|
+
vector_name = vector_name or data.pop('model', None)
|
|
171
174
|
messages = data.pop('messages', None)
|
|
172
175
|
chat_history = data.pop('chat_history', None)
|
|
173
176
|
stream = data.pop('stream', False)
|
|
174
177
|
|
|
178
|
+
log.info(f'openai_compatible_endpoint got data: {data} for vector: {vector_name}')
|
|
179
|
+
|
|
175
180
|
if not messages:
|
|
176
181
|
return jsonify({"error": "No messages provided"}), 400
|
|
177
182
|
|
|
@@ -192,34 +197,36 @@ def register_qna_routes(app, stream_interpreter, vac_interpreter):
|
|
|
192
197
|
|
|
193
198
|
def generate_response_content():
|
|
194
199
|
for chunk in start_streaming_chat(question=user_message,
|
|
195
|
-
vector_name=
|
|
200
|
+
vector_name=vector_name,
|
|
196
201
|
qna_func=observed_stream_interpreter,
|
|
197
202
|
chat_history=all_input["chat_history"],
|
|
198
203
|
wait_time=all_input.get("stream_wait_time", 1),
|
|
199
204
|
timeout=all_input.get("stream_timeout", 60),
|
|
200
205
|
**all_input["kwargs"]
|
|
201
206
|
):
|
|
202
|
-
if isinstance(chunk, dict) and '
|
|
207
|
+
if isinstance(chunk, dict) and 'answer' in chunk:
|
|
203
208
|
openai_chunk = {
|
|
204
209
|
"id": response_id,
|
|
205
210
|
"object": "chat.completion.chunk",
|
|
206
|
-
"created":
|
|
207
|
-
"model":
|
|
211
|
+
"created": str(datetime.time()),
|
|
212
|
+
"model": vector_name,
|
|
208
213
|
"system_fingerprint": sunholo_version(),
|
|
209
214
|
"choices": [{
|
|
210
215
|
"index": 0,
|
|
211
|
-
"delta": {"content": chunk['
|
|
216
|
+
"delta": {"content": chunk['answer']},
|
|
212
217
|
"logprobs": None,
|
|
213
218
|
"finish_reason": None
|
|
214
219
|
}]
|
|
215
220
|
}
|
|
216
221
|
yield json.dumps(openai_chunk) + "\n"
|
|
222
|
+
else:
|
|
223
|
+
log.info(f"Unknown chunk: {chunk}")
|
|
217
224
|
|
|
218
225
|
final_chunk = {
|
|
219
226
|
"id": response_id,
|
|
220
227
|
"object": "chat.completion.chunk",
|
|
221
|
-
"created":
|
|
222
|
-
"model":
|
|
228
|
+
"created": str(datetime.time()),
|
|
229
|
+
"model": vector_name,
|
|
223
230
|
"system_fingerprint": sunholo_version(),
|
|
224
231
|
"choices": [{
|
|
225
232
|
"index": 0,
|
|
@@ -236,7 +243,7 @@ def register_qna_routes(app, stream_interpreter, vac_interpreter):
|
|
|
236
243
|
try:
|
|
237
244
|
bot_output = observed_stream_interpreter(
|
|
238
245
|
question=user_message,
|
|
239
|
-
vector_name=
|
|
246
|
+
vector_name=vector_name,
|
|
240
247
|
chat_history=all_input["chat_history"],
|
|
241
248
|
**all_input["kwargs"]
|
|
242
249
|
)
|
|
@@ -245,8 +252,8 @@ def register_qna_routes(app, stream_interpreter, vac_interpreter):
|
|
|
245
252
|
openai_response = {
|
|
246
253
|
"id": response_id,
|
|
247
254
|
"object": "chat.completion",
|
|
248
|
-
"created":
|
|
249
|
-
"model":
|
|
255
|
+
"created": str(datetime.time()),
|
|
256
|
+
"model": vector_name,
|
|
250
257
|
"system_fingerprint": sunholo_version(),
|
|
251
258
|
"choices": [{
|
|
252
259
|
"index": 0,
|
|
@@ -264,6 +271,7 @@ def register_qna_routes(app, stream_interpreter, vac_interpreter):
|
|
|
264
271
|
}
|
|
265
272
|
}
|
|
266
273
|
|
|
274
|
+
log.info(f"OpenAI response: {openai_response}")
|
|
267
275
|
return jsonify(openai_response)
|
|
268
276
|
|
|
269
277
|
except Exception as err:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sunholo
|
|
3
|
-
Version: 0.64.
|
|
3
|
+
Version: 0.64.4
|
|
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.64.
|
|
6
|
+
Download-URL: https://github.com/sunholo-data/sunholo-py/archive/refs/tags/v0.64.4.tar.gz
|
|
7
7
|
Author: Holosun ApS
|
|
8
8
|
Author-email: multivac@sunholo.com
|
|
9
9
|
License: Apache License, Version 2.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|