← back to Exo
trigger start download without waiting for it to finish
af78341151c51a52594d175f4f6fdaab7e34a157 · 2024-12-03 07:53:11 +0000 · Alex Cheema
Files touched
Diff
commit af78341151c51a52594d175f4f6fdaab7e34a157
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Tue Dec 3 07:53:11 2024 +0000
trigger start download without waiting for it to finish
---
exo/api/chatgpt_api.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/exo/api/chatgpt_api.py b/exo/api/chatgpt_api.py
index a7436ec6..6a241131 100644
--- a/exo/api/chatgpt_api.py
+++ b/exo/api/chatgpt_api.py
@@ -419,12 +419,11 @@ class ChatGPTAPI:
if model_name not in model_cards: return web.json_response({"error": f"Invalid model: {model_name}. Supported models: {list(model_cards.keys())}"}, status=400)
shard = build_base_shard(model_name, self.inference_engine_classname)
if not shard: return web.json_response({"error": f"Could not build shard for model {model_name}"}, status=400)
-
- await self.node.inference_engine.ensure_shard(shard)
+ asyncio.create_task(self.node.inference_engine.ensure_shard(shard))
return web.json_response({
"status": "success",
- "message": f"Download triggered for model: {model_name}"
+ "message": f"Download started for model: {model_name}"
})
except Exception as e:
if DEBUG >= 2: traceback.print_exc()
← 75d45dd9 add endpoint for download
·
back to Exo
·
adding option to download model from sidebar 438310b4 →