Add Ollama connection check and better error messages
This commit is contained in:
7
main.py
7
main.py
@@ -276,6 +276,13 @@ async def get_llm_configuration(is_auth: bool = Depends(verify_password)):
|
||||
"""Retorna configuração atual de LLMs."""
|
||||
return JSONResponse(content=get_llm_config())
|
||||
|
||||
@app.get("/api/ollama-status")
|
||||
async def get_ollama_status(is_auth: bool = Depends(verify_password)):
|
||||
"""Verifica status do Ollama."""
|
||||
from llm_providers import check_ollama_connection
|
||||
result = check_ollama_connection()
|
||||
return JSONResponse(content=result)
|
||||
|
||||
@app.post("/api/llm-config")
|
||||
async def update_llm_configuration(config_data: dict, is_auth: bool = Depends(verify_password)):
|
||||
"""Atualiza configuração de LLMs."""
|
||||
|
||||
Reference in New Issue
Block a user