mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-21 14:59:02 +00:00
Embeddings: Add model load checks
Same as the normal model container. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -162,9 +162,15 @@ async def check_model_container():
|
||||
|
||||
|
||||
async def check_embeddings_container():
|
||||
"""FastAPI depends that checks if an embeddings model is loaded."""
|
||||
"""
|
||||
FastAPI depends that checks if an embeddings model is loaded.
|
||||
|
||||
if embeddings_container is None:
|
||||
This is the same as the model container check, but with embeddings instead.
|
||||
"""
|
||||
|
||||
if embeddings_container is None or not (
|
||||
embeddings_container.model_is_loading or embeddings_container.model_loaded
|
||||
):
|
||||
error_message = handle_request_error(
|
||||
"No embeddings models are currently loaded.",
|
||||
exc_info=False,
|
||||
|
||||
Reference in New Issue
Block a user