genieacs: implantação (TESTING)
Signed-off-by: Rodrigo Bertoldo de Sousa Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
1 parent
3726e4d449
commit
6e2473719d
8 files changed
+439
-1
No files matched your search
+30
-1
@@ -33,11 +33,15 @@ class NLPProcessor {
|
||||
'listar_servicos': ['listar serviços', 'servicos cliente', 'planos cliente', 'contratos cliente', 'ver servicos', 'plano cliente', 'assinaturas', 'planos', 'serviços ativos', 'ver plano'],
|
||||
'abrir_suporte': ['abrir suporte', 'criar suporte', 'adicionar suporte', 'novo suporte', 'suporte', 'chamado', 'ticket', 'atendimento', 'suporte tecnico', 'atendimento tecnico', 'abrir chamado', 'registrar chamado', 'criar chamado', 'visita tecnica', 'agendar visita', 'reclamação', 'reclamacao'],
|
||||
'consultar_usuario': ['consultar usuario', 'consultar user', 'ver usuario', 'status usuario', 'status user', 'info usuario', 'info user', 'checar usuario', 'verificar usuario', 'pesquisar usuario', 'localizar usuario', 'buscar usuario', 'usuario conectado', 'user conectado', 'usuario online', 'user online', 'usuario ativo', 'user ativo'],
|
||||
'diagnosticar': ['diagnosticar', 'diagnostico', 'diagnose', 'diagnosticar cliente', 'diagnostico cliente', 'checar cliente completo', 'verificar cliente completo', 'relatorio cliente', 'relatorio completo', 'status completo cliente', 'analisar cliente', 'inspecionar cliente', 'situacao do cliente', 'situação do cliente']
|
||||
'diagnosticar': ['diagnosticar', 'diagnostico', 'diagnose', 'diagnosticar cliente', 'diagnostico cliente', 'checar cliente completo', 'verificar cliente completo', 'relatorio cliente', 'relatorio completo', 'status completo cliente', 'analisar cliente', 'inspecionar cliente', 'situacao do cliente', 'situação do cliente'],
|
||||
'ver_roteador': ['ver roteador', 'info roteador', 'status roteador', 'roteador', 'cpe', 'ver cpe', 'info cpe', 'dados roteador', 'informações roteador', 'informacoes roteador', 'genieacs', 'ver device', 'info device', 'dispositivo cpe']
|
||||
};
|
||||
|
||||
// Padrões de comandos
|
||||
this.commandPatterns = [
|
||||
// Padrões específicos para GenieACS – ver roteador
|
||||
/^(ver|info|status|dados|informações|informacoes)\s+(roteador|cpe|device)\s+([A-Z0-9_-]+)$/i,
|
||||
/^(roteador|cpe)\s+([A-Z0-9_-]+)$/i,
|
||||
// Padrões específicos para TopSapp
|
||||
/^(buscar|procurar|encontrar)\s+(cliente|user)\s+(.+)$/i,
|
||||
/^(ver|mostrar)\s+(faturas?|boletos?|contas?)\s+(.+)$/i,
|
||||
@@ -161,6 +165,18 @@ class NLPProcessor {
|
||||
const fullMatch = match[0];
|
||||
const action = match[1];
|
||||
|
||||
// Detectar comando de ver roteador / CPE via GenieACS
|
||||
if (/roteador|cpe|device/i.test(fullMatch) && !/sinal|signal|onu|ont/i.test(fullMatch)) {
|
||||
// Padrão "ver roteador SERIAL" ou "roteador SERIAL"
|
||||
const serial = match[match.length - 1] || match[2];
|
||||
return {
|
||||
action: 'ver_roteador',
|
||||
target: serial ? serial.trim().toUpperCase() : null,
|
||||
confidence: 0.95,
|
||||
type: 'genieacs_pattern'
|
||||
};
|
||||
}
|
||||
|
||||
// Detectar comando de ver sinal
|
||||
if (/ver|verificar|check|sinal|signal/i.test(action) && /sinal|signal/i.test(fullMatch)) {
|
||||
let serialNumber = match[match.length - 1]; // Último grupo capturado
|
||||
@@ -736,6 +752,19 @@ class NLPProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
// Detectar "ver roteador SERIAL" / "roteador SERIAL" via GenieACS
|
||||
if (/roteador|cpe/i.test(text) && !/onu|ont|sinal|signal/i.test(text)) {
|
||||
const rrMatch = text.match(/(?:ver|info|status|dados)?\s*(?:roteador|cpe)\s+([A-Z0-9_-]+)/i);
|
||||
if (rrMatch && rrMatch[1]) {
|
||||
return {
|
||||
action: 'ver_roteador',
|
||||
target: rrMatch[1].trim().toUpperCase(),
|
||||
confidence: 0.9,
|
||||
type: 'keyword_roteador'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Procurar por ações conhecidas
|
||||
for (const [action, synonyms] of Object.entries(this.actionSynonyms)) {
|
||||
for (const synonym of synonyms) {
|
||||
|
||||
Reference in new issue
Block a user