File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 1515
1616'use strict' ;
1717
18- const common = require ( '@google-cloud/common ' ) ;
18+ const util = require ( 'util ' ) ;
1919const fs = require ( 'fs' ) ;
2020const structjson = require ( './structjson.js' ) ;
2121const pump = require ( 'pump' ) ;
@@ -145,7 +145,7 @@ function detectAudioIntent(
145145 const sessionPath = sessionClient . sessionPath ( projectId , sessionId ) ;
146146
147147 // Read the content of the audio file and send it as part of the request.
148- const readFile = common . util . promisify ( fs . readFile , { singular : true } ) ;
148+ const readFile = util . promisify ( fs . readFile ) ;
149149 readFile ( filename )
150150 . then ( inputAudio => {
151151 // The audio query request
Original file line number Diff line number Diff line change 1717
1818const projectId = process . env . GCLOUD_PROJECT ;
1919const sessionId = require ( 'uuid/v1' ) ( ) ;
20- const common = require ( '@google-cloud/common ' ) ;
20+ const util = require ( 'util ' ) ;
2121const structjson = require ( './structjson.js' ) ;
2222
2323function createKnowledgeBase ( projectId , displayName ) {
@@ -530,7 +530,7 @@ function detectIntentwithModelSelection(
530530 // Define session path
531531 const sessionPath = sessionClient . sessionPath ( projectId , sessionId ) ;
532532 // Read the content of the audio file and send it as part of the request.
533- const readFile = common . util . promisify ( fs . readFile , { singular : true } ) ;
533+ const readFile = util . promisify ( fs . readFile ) ;
534534 readFile ( audioFilePath )
535535 . then ( inputAudio => {
536536 // The audio query request
Original file line number Diff line number Diff line change 1212 "test" : " ava system-test"
1313 },
1414 "dependencies" : {
15- "@google-cloud/common" : " ^0.20.0" ,
1615 "dialogflow" : " 0.6.0" ,
1716 "grpc" : " ^1.4.1" ,
1817 "pump" : " ^3.0.0" ,
You can’t perform that action at this time.
0 commit comments