diff --git a/backend/main.py b/backend/main.py index b95c850..88a39cb 100644 --- a/backend/main.py +++ b/backend/main.py @@ -149,6 +149,12 @@ async def list_models(db: Session = Depends(get_db)): response = await proxy_request(f"{ollama_url}/api/tags", method="GET") return JSONResponse(content=response.json(), status_code=response.status_code) +@app.get("/api/ps") +async def running_models(db: Session = Depends(get_db)): + ollama_url = crud.get_setting(db, "ollama_url", os.getenv("OLLAMA_URL", "http://localhost:11434")) + response = await proxy_request(f"{ollama_url}/api/ps", method="GET") + return JSONResponse(content=response.json(), status_code=response.status_code) + @app.get("/api/versions") async def versions(db: Session = Depends(get_db)): ollama_url = crud.get_setting(db, "ollama_url", os.getenv("OLLAMA_URL", "http://localhost:11434"))