feat: /ollama head route

This commit is contained in:
Timothy J. Baek 2024-04-02 02:03:13 -07:00
parent 2c030218f8
commit 57530d87f6

View file

@ -81,6 +81,12 @@ async def check_url(request: Request, call_next):
return response return response
@app.head("/")
@app.get("/")
async def get_status():
return {"status": True}
@app.get("/urls") @app.get("/urls")
async def get_ollama_api_urls(user=Depends(get_admin_user)): async def get_ollama_api_urls(user=Depends(get_admin_user)):
return {"OLLAMA_BASE_URLS": app.state.OLLAMA_BASE_URLS} return {"OLLAMA_BASE_URLS": app.state.OLLAMA_BASE_URLS}