mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 04:29:16 +00:00
update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const dialogflow = require('@google-cloud/dialogflow');
|
||||
const fs = require('fs')
|
||||
const { nanoid } = require('nanoid')
|
||||
const crypto = require('crypto');
|
||||
/**
|
||||
* Debes de tener tu archivo con el nombre "chatbot-account.json" en la raíz del proyecto
|
||||
*/
|
||||
@@ -32,7 +32,7 @@ const checkFileCredentials = () => {
|
||||
// Detect intent method
|
||||
const detectIntent = async (queryText) => {
|
||||
let media = null;
|
||||
const sessionId = KEEP_DIALOG_FLOW ? 1 : nanoid();
|
||||
const sessionId = KEEP_DIALOG_FLOW ? 1 : crypto.randomUUID();
|
||||
const sessionPath = sessionClient.projectAgentSessionPath(PROJECID, sessionId);
|
||||
const languageCode = process.env.LANGUAGE
|
||||
const request = {
|
||||
|
||||
Reference in New Issue
Block a user