Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -467,9 +467,9 @@ RETORNE JSON:
|
|
| 467 |
def processar_pipeline(pergunta: str, historico: List, arquivo_anexo=None, dna=None) -> tuple:
|
| 468 |
if dna is None or not isinstance(dna, dict):
|
| 469 |
dna = criar_dna()
|
| 470 |
-
log("🧬 DNA inicializado")
|
| 471 |
|
| 472 |
-
log(f"🚀 PIPELINE v10: {pergunta[:60]}...")
|
| 473 |
|
| 474 |
if not pergunta.strip():
|
| 475 |
return "Digite uma pergunta válida", historico, dna
|
|
@@ -515,12 +515,12 @@ def processar_pipeline(pergunta: str, historico: List, arquivo_anexo=None, dna=N
|
|
| 515 |
dna["historico_chat"].append({"user": pergunta, "assistant": resposta_final})
|
| 516 |
dna["metadados"]["total_turnos"] += 1
|
| 517 |
|
| 518 |
-
log("✅ PIPELINE CONCLUÍDA")
|
| 519 |
return resposta_final, novo_historico, dna
|
| 520 |
|
| 521 |
except Exception as e:
|
| 522 |
erro_msg = f"❌ Erro na pipeline: {str(e)}"
|
| 523 |
-
log(f"ERRO: {e}", "ERROR")
|
| 524 |
return erro_msg, historico, dna
|
| 525 |
|
| 526 |
|
|
|
|
| 467 |
def processar_pipeline(pergunta: str, historico: List, arquivo_anexo=None, dna=None) -> tuple:
|
| 468 |
if dna is None or not isinstance(dna, dict):
|
| 469 |
dna = criar_dna()
|
| 470 |
+
logger.log("🧬 DNA inicializado")
|
| 471 |
|
| 472 |
+
logger.log(f"🚀 PIPELINE v10: {pergunta[:60]}...")
|
| 473 |
|
| 474 |
if not pergunta.strip():
|
| 475 |
return "Digite uma pergunta válida", historico, dna
|
|
|
|
| 515 |
dna["historico_chat"].append({"user": pergunta, "assistant": resposta_final})
|
| 516 |
dna["metadados"]["total_turnos"] += 1
|
| 517 |
|
| 518 |
+
logger.log("✅ PIPELINE CONCLUÍDA")
|
| 519 |
return resposta_final, novo_historico, dna
|
| 520 |
|
| 521 |
except Exception as e:
|
| 522 |
erro_msg = f"❌ Erro na pipeline: {str(e)}"
|
| 523 |
+
logger.log(f"ERRO: {e}", "ERROR")
|
| 524 |
return erro_msg, historico, dna
|
| 525 |
|
| 526 |
|