new feature: frontend with separated responses

This commit is contained in:
2026-09-11 09:33:55 -03:00
parent 6c81b21aaa
commit ecfbfbf8e1
60 changed files with 657 additions and 337 deletions

View File

@@ -183,12 +183,49 @@ def update_rag_telemetry(path: Path) -> None:
path.write_text(text, encoding="utf-8")
def update_rag_env(path: Path) -> None:
text = path.read_text(encoding="utf-8")
if "KBDB_IDENTIFY_DOCUMENT=" in text:
return
marker = "RAG_FILE_GLOBS=*.md,*.txt,*.yaml,*.yml,*.json\n"
settings_block = """
# RAG / KBDB
# RAG provider: standard (local) ou kbdb (PKG_KB_SERVING.SEARCH_KNOWLEDGE_BASE)
RAG_PROVIDER=standard
# KBDB usa credenciais próprias; não há fallback para ADB_*.
KBDB_DB_USER=
KBDB_DB_PASSWORD=
KBDB_DB_DSN=
KBDB_DB_WALLET_LOCATION=
KBDB_DB_WALLET_PASSWORD=
KBDB_SEARCH_TYPE=hybrid
KBDB_NODE_EXPANSION=true
KBDB_NODE_MAX_RELATED=8
KBDB_GRAPH_CROSS_REF=false
KBDB_MAX_CROSS_REF_HOPS=1
KBDB_DOCUMENT_TYPE=customer_safe
KBDB_METADATA_JSON=
KBDB_MIN_SCORE=
KBDB_IDENTIFY_DOCUMENT=true
KBDB_STORE_QUERY=true
KBDB_IDENTIFY_TOP_N=3
RAG_GROUNDED_ONLY=false
KBDB_GROUNDED_ONLY=true
"""
if marker in text:
text = text.replace(marker, marker + "\n" + settings_block, 1)
else:
text = text.rstrip() + "\n\n" + settings_block
path.write_text(text, encoding="utf-8")
def main() -> None:
tuning = ROOT / "Tuning-Performance"
states = sorted(tuning.glob("**/app/state.py"))
graphs = sorted(tuning.glob("**/app/workflows/agent_graph.py"))
agents = sorted(tuning.glob("**/app/agents/*.py"))
mains = sorted(tuning.glob("**/app/main.py"))
envs = sorted(tuning.glob("**/.env.example"))
for path in states:
update_state(path)
for path in graphs:
@@ -201,7 +238,9 @@ def main() -> None:
update_rag_agents(path)
for path in mains:
update_rag_http_response(path)
print(f"pending_topics/RAG sincronizado: {len(states)} states, {len(graphs)} graphs, {len(agents)} agents, {len(mains)} APIs")
for path in envs:
update_rag_env(path)
print(f"pending_topics/RAG sincronizado: {len(states)} states, {len(graphs)} graphs, {len(agents)} agents, {len(mains)} APIs, {len(envs)} envs")
if __name__ == "__main__":