Skip to content

Commit

Permalink
fix: model status in ui
Browse files Browse the repository at this point in the history
  • Loading branch information
leoguillaumegouv committed Oct 9, 2024
1 parent d1e6368 commit 5c8dda5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def health(user: User = Security(check_api_key)):

app.add_middleware(ContentSizeLimitMiddleware)

# Core
app.include_router(models.router, tags=["Core"], prefix="/v1")
app.include_router(chat.router, tags=["Core"], prefix="/v1")
app.include_router(completions.router, tags=["Core"], prefix="/v1")
Expand Down
4 changes: 2 additions & 2 deletions ui/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def get_models(api_key: str):
assert response.status_code == 200
models = response.json()["data"]

embeddings_models = [model["id"] for model in models if model["type"] == EMBEDDINGS_MODEL_TYPE]
language_models = [model["id"] for model in models if model["type"] == LANGUAGE_MODEL_TYPE]
embeddings_models = [model["id"] for model in models if model["type"] == EMBEDDINGS_MODEL_TYPE and model["status"] == "available"]
language_models = [model["id"] for model in models if model["type"] == LANGUAGE_MODEL_TYPE and model["status"] == "available"]

return language_models, embeddings_models

Expand Down

0 comments on commit 5c8dda5

Please sign in to comment.