Skip to content
This repository was archived by the owner on Dec 17, 2023. It is now read-only.

Commit 37dece2

Browse files
docs: added notes to train agent prior to sending queries (#319)
docs: added notes to train agent prior to sending queries fix: added resource reference to agent_version PiperOrigin-RevId: 380595849 Source-Link: googleapis/googleapis@5fe3c63 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a2b223aa1be1d3f92eb15da0bba5c02f469388e1 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 70320a1 commit 37dece2

16 files changed

Lines changed: 324 additions & 129 deletions

File tree

google/cloud/dialogflow_v2/services/agents/async_client.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ async def set_agent(
248248
) -> gcd_agent.Agent:
249249
r"""Creates/updates the specified agent.
250250
251+
Note: You should always train an agent prior to sending it
252+
queries. See the `training
253+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
254+
251255
Args:
252256
request (:class:`google.cloud.dialogflow_v2.types.SetAgentRequest`):
253257
The request object. The request message for
@@ -478,8 +482,9 @@ async def train_agent(
478482
) -> operation_async.AsyncOperation:
479483
r"""Trains the specified agent.
480484
481-
Operation <response:
482-
[google.protobuf.Empty][google.protobuf.Empty]>
485+
Note: You should always train an agent prior to sending it
486+
queries. See the `training
487+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
483488
484489
Args:
485490
request (:class:`google.cloud.dialogflow_v2.types.TrainAgentRequest`):
@@ -573,9 +578,6 @@ async def export_agent(
573578
) -> operation_async.AsyncOperation:
574579
r"""Exports the specified agent to a ZIP file.
575580
576-
Operation <response:
577-
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
578-
579581
Args:
580582
request (:class:`google.cloud.dialogflow_v2.types.ExportAgentRequest`):
581583
The request object. The request message for
@@ -669,10 +671,13 @@ async def import_agent(
669671
and wait for the operation it returns in order to train
670672
explicitly.
671673
672-
Operation <response:
673-
[google.protobuf.Empty][google.protobuf.Empty]> An operation
674-
which tracks when importing is complete. It only tracks when the
675-
draft agent is updated not when it is done training.
674+
An operation which tracks when importing is complete. It only
675+
tracks when the draft agent is updated not when it is done
676+
training.
677+
678+
Note: You should always train an agent prior to sending it
679+
queries. See the `training
680+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
676681
677682
Args:
678683
request (:class:`google.cloud.dialogflow_v2.types.ImportAgentRequest`):
@@ -753,10 +758,13 @@ async def restore_agent(
753758
and wait for the operation it returns in order to train
754759
explicitly.
755760
756-
Operation <response:
757-
[google.protobuf.Empty][google.protobuf.Empty]> An operation
758-
which tracks when restoring is complete. It only tracks when the
759-
draft agent is updated not when it is done training.
761+
An operation which tracks when restoring is complete. It only
762+
tracks when the draft agent is updated not when it is done
763+
training.
764+
765+
Note: You should always train an agent prior to sending it
766+
queries. See the `training
767+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
760768
761769
Args:
762770
request (:class:`google.cloud.dialogflow_v2.types.RestoreAgentRequest`):

google/cloud/dialogflow_v2/services/agents/client.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,10 @@ def set_agent(
436436
) -> gcd_agent.Agent:
437437
r"""Creates/updates the specified agent.
438438
439+
Note: You should always train an agent prior to sending it
440+
queries. See the `training
441+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
442+
439443
Args:
440444
request (google.cloud.dialogflow_v2.types.SetAgentRequest):
441445
The request object. The request message for
@@ -666,8 +670,9 @@ def train_agent(
666670
) -> operation.Operation:
667671
r"""Trains the specified agent.
668672
669-
Operation <response:
670-
[google.protobuf.Empty][google.protobuf.Empty]>
673+
Note: You should always train an agent prior to sending it
674+
queries. See the `training
675+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
671676
672677
Args:
673678
request (google.cloud.dialogflow_v2.types.TrainAgentRequest):
@@ -761,9 +766,6 @@ def export_agent(
761766
) -> operation.Operation:
762767
r"""Exports the specified agent to a ZIP file.
763768
764-
Operation <response:
765-
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
766-
767769
Args:
768770
request (google.cloud.dialogflow_v2.types.ExportAgentRequest):
769771
The request object. The request message for
@@ -857,10 +859,13 @@ def import_agent(
857859
and wait for the operation it returns in order to train
858860
explicitly.
859861
860-
Operation <response:
861-
[google.protobuf.Empty][google.protobuf.Empty]> An operation
862-
which tracks when importing is complete. It only tracks when the
863-
draft agent is updated not when it is done training.
862+
An operation which tracks when importing is complete. It only
863+
tracks when the draft agent is updated not when it is done
864+
training.
865+
866+
Note: You should always train an agent prior to sending it
867+
queries. See the `training
868+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
864869
865870
Args:
866871
request (google.cloud.dialogflow_v2.types.ImportAgentRequest):
@@ -942,10 +947,13 @@ def restore_agent(
942947
and wait for the operation it returns in order to train
943948
explicitly.
944949
945-
Operation <response:
946-
[google.protobuf.Empty][google.protobuf.Empty]> An operation
947-
which tracks when restoring is complete. It only tracks when the
948-
draft agent is updated not when it is done training.
950+
An operation which tracks when restoring is complete. It only
951+
tracks when the draft agent is updated not when it is done
952+
training.
953+
954+
Note: You should always train an agent prior to sending it
955+
queries. See the `training
956+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
949957
950958
Args:
951959
request (google.cloud.dialogflow_v2.types.RestoreAgentRequest):

google/cloud/dialogflow_v2/services/agents/transports/grpc.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@ def set_agent(self) -> Callable[[gcd_agent.SetAgentRequest], gcd_agent.Agent]:
271271
272272
Creates/updates the specified agent.
273273
274+
Note: You should always train an agent prior to sending it
275+
queries. See the `training
276+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
277+
274278
Returns:
275279
Callable[[~.SetAgentRequest],
276280
~.Agent]:
@@ -353,8 +357,9 @@ def train_agent(
353357
354358
Trains the specified agent.
355359
356-
Operation <response:
357-
[google.protobuf.Empty][google.protobuf.Empty]>
360+
Note: You should always train an agent prior to sending it
361+
queries. See the `training
362+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
358363
359364
Returns:
360365
Callable[[~.TrainAgentRequest],
@@ -382,9 +387,6 @@ def export_agent(
382387
383388
Exports the specified agent to a ZIP file.
384389
385-
Operation <response:
386-
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
387-
388390
Returns:
389391
Callable[[~.ExportAgentRequest],
390392
~.Operation]:
@@ -422,10 +424,13 @@ def import_agent(
422424
and wait for the operation it returns in order to train
423425
explicitly.
424426
425-
Operation <response:
426-
[google.protobuf.Empty][google.protobuf.Empty]> An operation
427-
which tracks when importing is complete. It only tracks when the
428-
draft agent is updated not when it is done training.
427+
An operation which tracks when importing is complete. It only
428+
tracks when the draft agent is updated not when it is done
429+
training.
430+
431+
Note: You should always train an agent prior to sending it
432+
queries. See the `training
433+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
429434
430435
Returns:
431436
Callable[[~.ImportAgentRequest],
@@ -462,10 +467,13 @@ def restore_agent(
462467
and wait for the operation it returns in order to train
463468
explicitly.
464469
465-
Operation <response:
466-
[google.protobuf.Empty][google.protobuf.Empty]> An operation
467-
which tracks when restoring is complete. It only tracks when the
468-
draft agent is updated not when it is done training.
470+
An operation which tracks when restoring is complete. It only
471+
tracks when the draft agent is updated not when it is done
472+
training.
473+
474+
Note: You should always train an agent prior to sending it
475+
queries. See the `training
476+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
469477
470478
Returns:
471479
Callable[[~.RestoreAgentRequest],

google/cloud/dialogflow_v2/services/agents/transports/grpc_asyncio.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ def set_agent(
278278
279279
Creates/updates the specified agent.
280280
281+
Note: You should always train an agent prior to sending it
282+
queries. See the `training
283+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
284+
281285
Returns:
282286
Callable[[~.SetAgentRequest],
283287
Awaitable[~.Agent]]:
@@ -362,8 +366,9 @@ def train_agent(
362366
363367
Trains the specified agent.
364368
365-
Operation <response:
366-
[google.protobuf.Empty][google.protobuf.Empty]>
369+
Note: You should always train an agent prior to sending it
370+
queries. See the `training
371+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
367372
368373
Returns:
369374
Callable[[~.TrainAgentRequest],
@@ -391,9 +396,6 @@ def export_agent(
391396
392397
Exports the specified agent to a ZIP file.
393398
394-
Operation <response:
395-
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
396-
397399
Returns:
398400
Callable[[~.ExportAgentRequest],
399401
Awaitable[~.Operation]]:
@@ -431,10 +433,13 @@ def import_agent(
431433
and wait for the operation it returns in order to train
432434
explicitly.
433435
434-
Operation <response:
435-
[google.protobuf.Empty][google.protobuf.Empty]> An operation
436-
which tracks when importing is complete. It only tracks when the
437-
draft agent is updated not when it is done training.
436+
An operation which tracks when importing is complete. It only
437+
tracks when the draft agent is updated not when it is done
438+
training.
439+
440+
Note: You should always train an agent prior to sending it
441+
queries. See the `training
442+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
438443
439444
Returns:
440445
Callable[[~.ImportAgentRequest],
@@ -471,10 +476,13 @@ def restore_agent(
471476
and wait for the operation it returns in order to train
472477
explicitly.
473478
474-
Operation <response:
475-
[google.protobuf.Empty][google.protobuf.Empty]> An operation
476-
which tracks when restoring is complete. It only tracks when the
477-
draft agent is updated not when it is done training.
479+
An operation which tracks when restoring is complete. It only
480+
tracks when the draft agent is updated not when it is done
481+
training.
482+
483+
Note: You should always train an agent prior to sending it
484+
queries. See the `training
485+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
478486
479487
Returns:
480488
Callable[[~.RestoreAgentRequest],

google/cloud/dialogflow_v2/services/entity_types/async_client.py

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,10 @@ async def create_entity_type(
368368
) -> gcd_entity_type.EntityType:
369369
r"""Creates an entity type in the specified agent.
370370
371+
Note: You should always train an agent prior to sending it
372+
queries. See the `training
373+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
374+
371375
Args:
372376
request (:class:`google.cloud.dialogflow_v2.types.CreateEntityTypeRequest`):
373377
The request object. The request message for
@@ -472,6 +476,10 @@ async def update_entity_type(
472476
) -> gcd_entity_type.EntityType:
473477
r"""Updates the specified entity type.
474478
479+
Note: You should always train an agent prior to sending it
480+
queries. See the `training
481+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
482+
475483
Args:
476484
request (:class:`google.cloud.dialogflow_v2.types.UpdateEntityTypeRequest`):
477485
The request object. The request message for
@@ -568,6 +576,10 @@ async def delete_entity_type(
568576
) -> None:
569577
r"""Deletes the specified entity type.
570578
579+
Note: You should always train an agent prior to sending it
580+
queries. See the `training
581+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
582+
571583
Args:
572584
request (:class:`google.cloud.dialogflow_v2.types.DeleteEntityTypeRequest`):
573585
The request object. The request message for
@@ -631,8 +643,9 @@ async def batch_update_entity_types(
631643
) -> operation_async.AsyncOperation:
632644
r"""Updates/Creates multiple entity types in the specified agent.
633645
634-
Operation <response:
635-
[BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse]>
646+
Note: You should always train an agent prior to sending it
647+
queries. See the `training
648+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
636649
637650
Args:
638651
request (:class:`google.cloud.dialogflow_v2.types.BatchUpdateEntityTypesRequest`):
@@ -697,8 +710,9 @@ async def batch_delete_entity_types(
697710
) -> operation_async.AsyncOperation:
698711
r"""Deletes entity types in the specified agent.
699712
700-
Operation <response:
701-
[google.protobuf.Empty][google.protobuf.Empty]>
713+
Note: You should always train an agent prior to sending it
714+
queries. See the `training
715+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
702716
703717
Args:
704718
request (:class:`google.cloud.dialogflow_v2.types.BatchDeleteEntityTypesRequest`):
@@ -803,8 +817,9 @@ async def batch_create_entities(
803817
) -> operation_async.AsyncOperation:
804818
r"""Creates multiple new entities in the specified entity type.
805819
806-
Operation <response:
807-
[google.protobuf.Empty][google.protobuf.Empty]>
820+
Note: You should always train an agent prior to sending it
821+
queries. See the `training
822+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
808823
809824
Args:
810825
request (:class:`google.cloud.dialogflow_v2.types.BatchCreateEntitiesRequest`):
@@ -922,8 +937,9 @@ async def batch_update_entities(
922937
type. This method does not affect entities in the entity type
923938
that aren't explicitly specified in the request.
924939
925-
Operation <response:
926-
[google.protobuf.Empty][google.protobuf.Empty]>
940+
Note: You should always train an agent prior to sending it
941+
queries. See the `training
942+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
927943
928944
Args:
929945
request (:class:`google.cloud.dialogflow_v2.types.BatchUpdateEntitiesRequest`):
@@ -1041,8 +1057,9 @@ async def batch_delete_entities(
10411057
) -> operation_async.AsyncOperation:
10421058
r"""Deletes entities in the specified entity type.
10431059
1044-
Operation <response:
1045-
[google.protobuf.Empty][google.protobuf.Empty]>
1060+
Note: You should always train an agent prior to sending it
1061+
queries. See the `training
1062+
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
10461063
10471064
Args:
10481065
request (:class:`google.cloud.dialogflow_v2.types.BatchDeleteEntitiesRequest`):

0 commit comments

Comments
 (0)