1
-
2
1
.. This file is automatically generated. Do not edit this file directly.
3
2
4
3
Dialogflow Enterprise Edition API Python Samples
@@ -16,11 +15,13 @@ This directory contains samples for Dialogflow Enterprise Edition API. The `Dia
16
15
.. _Dialogflow Enterprise Edition API : https://cloud.google.com/dialogflow-enterprise/docs/
17
16
18
17
18
+
19
+
20
+
19
21
Setup
20
22
-------------------------------------------------------------------------------
21
23
22
24
23
-
24
25
Authentication
25
26
++++++++++++++
26
27
@@ -31,9 +32,6 @@ credentials for applications.
31
32
.. _Authentication Getting Started Guide :
32
33
https://cloud.google.com/docs/authentication/getting-started
33
34
34
-
35
-
36
-
37
35
Install Dependencies
38
36
++++++++++++++++++++
39
37
@@ -64,15 +62,9 @@ Install Dependencies
64
62
.. _pip : https://pip.pypa.io/
65
63
.. _virtualenv : https://virtualenv.pypa.io/
66
64
67
-
68
-
69
-
70
-
71
-
72
65
Samples
73
66
-------------------------------------------------------------------------------
74
67
75
-
76
68
Detect Intent Text
77
69
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
78
70
@@ -88,7 +80,6 @@ To run this sample:
88
80
89
81
$ python detect_intent_texts.py
90
82
91
-
92
83
usage: detect_intent_texts.py [-h] --project-id PROJECT_ID
93
84
[--session-id SESSION_ID]
94
85
[--language-code LANGUAGE_CODE]
@@ -116,8 +107,6 @@ To run this sample:
116
107
117
108
118
109
119
-
120
-
121
110
Detect Intent Audio
122
111
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
123
112
@@ -133,7 +122,6 @@ To run this sample:
133
122
134
123
$ python detect_intent_audio.py
135
124
136
-
137
125
usage: detect_intent_audio.py [-h] --project-id PROJECT_ID
138
126
[--session-id SESSION_ID]
139
127
[--language-code LANGUAGE_CODE]
@@ -161,8 +149,6 @@ To run this sample:
161
149
162
150
163
151
164
-
165
-
166
152
Detect Intent Stream
167
153
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
168
154
@@ -178,7 +164,6 @@ To run this sample:
178
164
179
165
$ python detect_intent_stream.py
180
166
181
-
182
167
usage: detect_intent_stream.py [-h] --project-id PROJECT_ID
183
168
[--session-id SESSION_ID]
184
169
[--language-code LANGUAGE_CODE]
@@ -206,8 +191,6 @@ To run this sample:
206
191
207
192
208
193
209
-
210
-
211
194
Detect Intent Knowledge Base
212
195
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
213
196
@@ -223,7 +206,6 @@ To run this sample:
223
206
224
207
$ python detect_intent_knowledge.py
225
208
226
-
227
209
usage: detect_intent_knowledge.py [-h] --project-id PROJECT_ID
228
210
[--session-id SESSION_ID]
229
211
[--language-code LANGUAGE_CODE]
@@ -253,8 +235,6 @@ To run this sample:
253
235
254
236
255
237
256
-
257
-
258
238
Detect Intent with Sentiment Analysis
259
239
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
260
240
@@ -270,7 +250,6 @@ To run this sample:
270
250
271
251
$ python detect_intent_with_sentiment_analysis.py
272
252
273
-
274
253
usage: detect_intent_with_sentiment_analysis.py [-h] --project-id PROJECT_ID
275
254
[--session-id SESSION_ID]
276
255
[--language-code LANGUAGE_CODE]
@@ -297,8 +276,6 @@ To run this sample:
297
276
298
277
299
278
300
-
301
-
302
279
Detect Intent with Text to Speech Response
303
280
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
304
281
@@ -314,7 +291,6 @@ To run this sample:
314
291
315
292
$ python detect_intent_with_texttospeech_response.py
316
293
317
-
318
294
usage: detect_intent_with_texttospeech_response.py [-h] --project-id
319
295
PROJECT_ID
320
296
[--session-id SESSION_ID]
@@ -342,8 +318,6 @@ To run this sample:
342
318
343
319
344
320
345
-
346
-
347
321
Intent Management
348
322
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
349
323
@@ -359,7 +333,6 @@ To run this sample:
359
333
360
334
$ python intent_management.py
361
335
362
-
363
336
usage: intent_management.py [-h] --project-id PROJECT_ID
364
337
{list,create,delete} ...
365
338
@@ -385,8 +358,6 @@ To run this sample:
385
358
386
359
387
360
388
-
389
-
390
361
Knowledge Base Management
391
362
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
392
363
@@ -402,18 +373,24 @@ To run this sample:
402
373
403
374
$ python knowledge_base_management.py
404
375
405
-
406
- usage: knowledge_base_management.py [-h] --project-id PROJECT_ID { create} ...
376
+ usage: knowledge_base_management.py [-h] --project-id PROJECT_ID
377
+ {list, create,get,delete } ...
407
378
408
379
Dialogflow API Python sample showing how to manage Knowledge bases.
409
380
410
381
Examples:
411
382
python knowledge_base_management.py -h
383
+ python knowledge_base_management.py --project-id PROJECT_ID list
412
384
python knowledge_base_management.py --project-id PROJECT_ID create --display-name DISPLAY_NAME
385
+ python knowledge_base_management.py --project-id PROJECT_ID get --knowledge-base-id knowledge_base_id
386
+ python knowledge_base_management.py --project-id PROJECT_ID delete --knowledge-base-id knowledge_base_id
413
387
414
388
positional arguments:
415
- {create}
389
+ {list,create,get,delete}
390
+ list List all Knowledge bases that belong to the project.
416
391
create Create a new Knowledge base.
392
+ get Get a Knowledge base by its id.
393
+ delete Delete a Knowledge base by its id.
417
394
418
395
optional arguments:
419
396
-h, --help show this help message and exit
@@ -422,8 +399,6 @@ To run this sample:
422
399
423
400
424
401
425
-
426
-
427
402
Document Management
428
403
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
429
404
@@ -439,21 +414,26 @@ To run this sample:
439
414
440
415
$ python document_management.py
441
416
442
-
443
417
usage: document_management.py [-h] --project-id PROJECT_ID --knowledge-base-id
444
418
KNOWLEDGE_BASE_ID
445
- {create} ...
419
+ {list, create,get,delete } ...
446
420
447
421
Dialogflow API Python sample showing how to manage Knowledge Documents.
448
422
449
423
Examples:
450
424
python document_management.py -h
425
+ python document_management.py --project-id PROJECT_ID --knowledge-base-id knowledge_base_id list
451
426
python document_management.py --project-id PROJECT_ID --knowledge-base-id knowledge_base_id create --display-name DISPLAY_NAME --mime-type MIME_TYPE --knowledge-type KNOWLEDGE_TYPE --content-uri CONTENT_URI
452
- python document_management.py --project-id PROJECT_ID --knowledge-base-id knowledge_base_id
427
+ python document_management.py --project-id PROJECT_ID --knowledge-base-id knowledge_base_id get --document-id DOCUMENT_ID
428
+ python document_management.py --project-id PROJECT_ID --knowledge-base-id knowledge_base_id delete --document-id DOCUMENT_ID
453
429
454
430
positional arguments:
455
- {create}
431
+ {list,create,get,delete}
432
+ list List all Documents that belong to a certain Knowledge
433
+ base.
456
434
create Create a Document for a certain Knowledge base.
435
+ get Get a Document by its id and the Knowledge base id.
436
+ delete Delete a Document by its id and the Knowledge baseid.
457
437
458
438
optional arguments:
459
439
-h, --help show this help message and exit
@@ -467,10 +447,6 @@ To run this sample:
467
447
468
448
469
449
470
-
471
-
472
-
473
-
474
450
The client library
475
451
-------------------------------------------------------------------------------
476
452
@@ -486,5 +462,4 @@ to `browse the source`_ and `report issues`_.
486
462
https://github.com/GoogleCloudPlatform/google-cloud-python/issues
487
463
488
464
489
-
490
- .. _Google Cloud SDK : https://cloud.google.com/sdk/
465
+ .. _Google Cloud SDK : https://cloud.google.com/sdk/
0 commit comments