Skip to content

Commit

Permalink
docs: remove unused dialogflow code samples (#563)
Browse files Browse the repository at this point in the history
* remove dialogflow_delete_document region tag and code

* remove dialogflow_delete_knowledge_base  region tag and code

* remove dialogflow_detect_intent_with_model_selection region tag and code

* remove dialogflow_get_document region tag and code

* remove dialogflow_get_knowledge_base region tag and code

* remove dialogflow_list_document region tag and code

* remove dialogflow_list_knowledge_base region tag and code

* remove dialogflow_quickstart code

* delete all dialogflow_create* region tags and code

* remove dialogflow_delete* region tags and code

* remove dialogflow_list* region tags and code

* clean up comment span delimiters for deleted code

* Update detect.v2beta1.js

* Update detect.v2beta1.js

* Update resource.js

* Update detect.v2beta1.test.js

* Update resource.test.js

* Update detect.v2beta1.js

* docs: remove broken yargs commands from sample deletes

* Create create-document.v2beta1.test.js

* Create create-intent.test.js

* Create create-knowledge-base.v2beta1.test.js

* Create create-session-entity-type.test.js

* Create delete-intent.test.js

* Create delete-session-entity-type.test.js

* Update detect.v2beta1.test.js

* Create list-session-entity-types.test.js

* Update detect.v2beta1.js

* Delete resource.test.js

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Noah Negrey <nnegrey@users.noreply.github.com>
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
  • Loading branch information
4 people authored and NimJay committed Nov 18, 2022
1 parent 0595558 commit a3096ad
Show file tree
Hide file tree
Showing 12 changed files with 450 additions and 1,041 deletions.
12 changes: 6 additions & 6 deletions dialogflow/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async function detectEventIntent(
eventName,
languageCode
) {
const {struct} = require('pb-util');
const { struct } = require('pb-util');

// Imports the Dialogflow library
const dialogflow = require('dialogflow');
Expand All @@ -122,7 +122,7 @@ async function detectEventIntent(
queryInput: {
event: {
name: eventName,
parameters: struct.encode({foo: 'bar'}),
parameters: struct.encode({ foo: 'bar' }),
languageCode: languageCode,
},
},
Expand Down Expand Up @@ -168,7 +168,7 @@ async function detectAudioIntent(
// [START dialogflow_detect_intent_audio]
const fs = require('fs');
const util = require('util');
const {struct} = require('pb-util');
const { struct } = require('pb-util');
// Imports the Dialogflow library
const dialogflow = require('dialogflow');

Expand Down Expand Up @@ -236,8 +236,8 @@ async function streamingDetectIntent(
// [START dialogflow_detect_intent_streaming]
const fs = require('fs');
const util = require('util');
const {Transform, pipeline} = require('stream');
const {struct} = require('pb-util');
const { Transform, pipeline } = require('stream');
const { struct } = require('pb-util');

const pump = util.promisify(pipeline);
// Imports the Dialogflow library
Expand Down Expand Up @@ -324,7 +324,7 @@ async function streamingDetectIntent(
new Transform({
objectMode: true,
transform: (obj, _, next) => {
next(null, {inputAudio: obj});
next(null, { inputAudio: obj });
},
}),
detectStream
Expand Down
Loading

0 comments on commit a3096ad

Please sign in to comment.