How to use the category function from request

Find comprehensive JavaScript request.category code examples handpicked from public code repositorys.

1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
})

socket.on('gini-request-ai-engine-processing', (request) => {
    if(request.category === "delete_intent" || request.category === "delete_entity"){
        let updated_AI_data = AI_ENGINE_PROCESSING_SERVICE.aiEngineProcessing(request);
        let type = request.category.split("_")[1];
        socket.emit("gini-response-ai-data", {data : updated_AI_data, type: type})
    }else{
      AI_ENGINE_PROCESSING_SERVICE.aiEngineProcessing(request);
    }
fork icon0
star icon0
watch icon1