mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-17 19:26:23 +00:00
@@ -1,6 +1,6 @@
|
||||
const dialogflow = require('@google-cloud/dialogflow');
|
||||
const fs = require('fs')
|
||||
const nanoid = require('nanoid')
|
||||
//const nanoid = require('nanoid')
|
||||
/**
|
||||
* Debes de tener tu archivo con el nombre "chatbot-account.json" en la raíz del proyecto
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ const checkFileCredentials = () => {
|
||||
// Detect intent method
|
||||
const detectIntent = async (queryText) => {
|
||||
let media = null;
|
||||
const sessionId = nanoid.nanoid()
|
||||
const sessionId = 1
|
||||
const sessionPath = sessionClient.projectAgentSessionPath(PROJECID, sessionId);
|
||||
const languageCode = process.env.LANGUAGE
|
||||
const request = {
|
||||
@@ -72,4 +72,4 @@ const getDataIa = (message = '', cb = () => { }) => {
|
||||
|
||||
checkFileCredentials();
|
||||
|
||||
module.exports = { getDataIa }
|
||||
module.exports = { getDataIa }
|
||||
|
||||
Reference in New Issue
Block a user