refactor: Update credential synchronization to async Gitea fetch and simplify root HTML serving.
This commit is contained in:
4
main.py
4
main.py
@@ -10,7 +10,7 @@ from fastapi.templating import Jinja2Templates
|
||||
from dotenv import load_dotenv
|
||||
from starlette.concurrency import run_in_threadpool
|
||||
|
||||
from ai_agent import query_agent
|
||||
from ai_agent import query_agent_async
|
||||
from config import get_config, save_config
|
||||
from credential_manager import fetch_from_gitea_repo_async
|
||||
from orchestrator import (
|
||||
@@ -58,7 +58,7 @@ async def get_system_status(is_auth: bool = Depends(verify_password)):
|
||||
async def web_chat(message: dict, is_auth: bool = Depends(verify_password)):
|
||||
user_text = message.get("text", "")
|
||||
if not user_text: return {"reply": "Vazio."}
|
||||
reply = query_agent(user_text)
|
||||
reply = await query_agent_async(user_text)
|
||||
return {"reply": reply}
|
||||
|
||||
@app.post("/api/orchestrate")
|
||||
|
||||
Reference in New Issue
Block a user