🚀 Auto-deploy: BotVPS atualizado em 24/03/2026 11:41:41

This commit is contained in:
2026-03-24 11:41:41 +00:00
parent 3a5fecb344
commit f92ee9d2b9
2 changed files with 7 additions and 3 deletions

View File

@@ -127,8 +127,11 @@ async def test_llm_latency(is_auth: bool = Depends(verify_password)):
@app.post("/api/chat")
async def web_chat(message: dict, is_auth: bool = Depends(verify_password)):
user_text = message.get("text", "")
history = message.get("history", []) # Extrai o histórico do frontend
if not user_text: return {"reply": "Vazio."}
reply = await query_agent_async(user_text)
# Repassa o histórico para manter o contexto da conversa
reply = await query_agent_async(user_text, chat_history=history)
return {"reply": reply}
@app.post("/api/orchestrate")