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

Commit

Permalink
Browse files Browse the repository at this point in the history
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: googleapis/googleapis-gen@a2b223a

* 🦉 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jun 21, 2021
1 parent 70320a1 commit 37dece2
Show file tree
Hide file tree
Showing 16 changed files with 324 additions and 129 deletions.
34 changes: 21 additions & 13 deletions google/cloud/dialogflow_v2/services/agents/async_client.py
Expand Up @@ -248,6 +248,10 @@ async def set_agent(
) -> gcd_agent.Agent:
r"""Creates/updates the specified agent.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.SetAgentRequest`):
The request object. The request message for
Expand Down Expand Up @@ -478,8 +482,9 @@ async def train_agent(
) -> operation_async.AsyncOperation:
r"""Trains the specified agent.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]>
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.TrainAgentRequest`):
Expand Down Expand Up @@ -573,9 +578,6 @@ async def export_agent(
) -> operation_async.AsyncOperation:
r"""Exports the specified agent to a ZIP file.
Operation <response:
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
Args:
request (:class:`google.cloud.dialogflow_v2.types.ExportAgentRequest`):
The request object. The request message for
Expand Down Expand Up @@ -669,10 +671,13 @@ async def import_agent(
and wait for the operation it returns in order to train
explicitly.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]> An operation
which tracks when importing is complete. It only tracks when the
draft agent is updated not when it is done training.
An operation which tracks when importing is complete. It only
tracks when the draft agent is updated not when it is done
training.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.ImportAgentRequest`):
Expand Down Expand Up @@ -753,10 +758,13 @@ async def restore_agent(
and wait for the operation it returns in order to train
explicitly.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]> An operation
which tracks when restoring is complete. It only tracks when the
draft agent is updated not when it is done training.
An operation which tracks when restoring is complete. It only
tracks when the draft agent is updated not when it is done
training.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.RestoreAgentRequest`):
Expand Down
34 changes: 21 additions & 13 deletions google/cloud/dialogflow_v2/services/agents/client.py
Expand Up @@ -436,6 +436,10 @@ def set_agent(
) -> gcd_agent.Agent:
r"""Creates/updates the specified agent.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (google.cloud.dialogflow_v2.types.SetAgentRequest):
The request object. The request message for
Expand Down Expand Up @@ -666,8 +670,9 @@ def train_agent(
) -> operation.Operation:
r"""Trains the specified agent.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]>
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (google.cloud.dialogflow_v2.types.TrainAgentRequest):
Expand Down Expand Up @@ -761,9 +766,6 @@ def export_agent(
) -> operation.Operation:
r"""Exports the specified agent to a ZIP file.
Operation <response:
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
Args:
request (google.cloud.dialogflow_v2.types.ExportAgentRequest):
The request object. The request message for
Expand Down Expand Up @@ -857,10 +859,13 @@ def import_agent(
and wait for the operation it returns in order to train
explicitly.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]> An operation
which tracks when importing is complete. It only tracks when the
draft agent is updated not when it is done training.
An operation which tracks when importing is complete. It only
tracks when the draft agent is updated not when it is done
training.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (google.cloud.dialogflow_v2.types.ImportAgentRequest):
Expand Down Expand Up @@ -942,10 +947,13 @@ def restore_agent(
and wait for the operation it returns in order to train
explicitly.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]> An operation
which tracks when restoring is complete. It only tracks when the
draft agent is updated not when it is done training.
An operation which tracks when restoring is complete. It only
tracks when the draft agent is updated not when it is done
training.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (google.cloud.dialogflow_v2.types.RestoreAgentRequest):
Expand Down
34 changes: 21 additions & 13 deletions google/cloud/dialogflow_v2/services/agents/transports/grpc.py
Expand Up @@ -271,6 +271,10 @@ def set_agent(self) -> Callable[[gcd_agent.SetAgentRequest], gcd_agent.Agent]:
Creates/updates the specified agent.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Returns:
Callable[[~.SetAgentRequest],
~.Agent]:
Expand Down Expand Up @@ -353,8 +357,9 @@ def train_agent(
Trains the specified agent.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]>
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Returns:
Callable[[~.TrainAgentRequest],
Expand Down Expand Up @@ -382,9 +387,6 @@ def export_agent(
Exports the specified agent to a ZIP file.
Operation <response:
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
Returns:
Callable[[~.ExportAgentRequest],
~.Operation]:
Expand Down Expand Up @@ -422,10 +424,13 @@ def import_agent(
and wait for the operation it returns in order to train
explicitly.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]> An operation
which tracks when importing is complete. It only tracks when the
draft agent is updated not when it is done training.
An operation which tracks when importing is complete. It only
tracks when the draft agent is updated not when it is done
training.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Returns:
Callable[[~.ImportAgentRequest],
Expand Down Expand Up @@ -462,10 +467,13 @@ def restore_agent(
and wait for the operation it returns in order to train
explicitly.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]> An operation
which tracks when restoring is complete. It only tracks when the
draft agent is updated not when it is done training.
An operation which tracks when restoring is complete. It only
tracks when the draft agent is updated not when it is done
training.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Returns:
Callable[[~.RestoreAgentRequest],
Expand Down
Expand Up @@ -278,6 +278,10 @@ def set_agent(
Creates/updates the specified agent.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Returns:
Callable[[~.SetAgentRequest],
Awaitable[~.Agent]]:
Expand Down Expand Up @@ -362,8 +366,9 @@ def train_agent(
Trains the specified agent.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]>
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Returns:
Callable[[~.TrainAgentRequest],
Expand Down Expand Up @@ -391,9 +396,6 @@ def export_agent(
Exports the specified agent to a ZIP file.
Operation <response:
[ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
Returns:
Callable[[~.ExportAgentRequest],
Awaitable[~.Operation]]:
Expand Down Expand Up @@ -431,10 +433,13 @@ def import_agent(
and wait for the operation it returns in order to train
explicitly.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]> An operation
which tracks when importing is complete. It only tracks when the
draft agent is updated not when it is done training.
An operation which tracks when importing is complete. It only
tracks when the draft agent is updated not when it is done
training.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Returns:
Callable[[~.ImportAgentRequest],
Expand Down Expand Up @@ -471,10 +476,13 @@ def restore_agent(
and wait for the operation it returns in order to train
explicitly.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]> An operation
which tracks when restoring is complete. It only tracks when the
draft agent is updated not when it is done training.
An operation which tracks when restoring is complete. It only
tracks when the draft agent is updated not when it is done
training.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Returns:
Callable[[~.RestoreAgentRequest],
Expand Down
37 changes: 27 additions & 10 deletions google/cloud/dialogflow_v2/services/entity_types/async_client.py
Expand Up @@ -368,6 +368,10 @@ async def create_entity_type(
) -> gcd_entity_type.EntityType:
r"""Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.CreateEntityTypeRequest`):
The request object. The request message for
Expand Down Expand Up @@ -472,6 +476,10 @@ async def update_entity_type(
) -> gcd_entity_type.EntityType:
r"""Updates the specified entity type.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.UpdateEntityTypeRequest`):
The request object. The request message for
Expand Down Expand Up @@ -568,6 +576,10 @@ async def delete_entity_type(
) -> None:
r"""Deletes the specified entity type.
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.DeleteEntityTypeRequest`):
The request object. The request message for
Expand Down Expand Up @@ -631,8 +643,9 @@ async def batch_update_entity_types(
) -> operation_async.AsyncOperation:
r"""Updates/Creates multiple entity types in the specified agent.
Operation <response:
[BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse]>
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.BatchUpdateEntityTypesRequest`):
Expand Down Expand Up @@ -697,8 +710,9 @@ async def batch_delete_entity_types(
) -> operation_async.AsyncOperation:
r"""Deletes entity types in the specified agent.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]>
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.BatchDeleteEntityTypesRequest`):
Expand Down Expand Up @@ -803,8 +817,9 @@ async def batch_create_entities(
) -> operation_async.AsyncOperation:
r"""Creates multiple new entities in the specified entity type.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]>
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.BatchCreateEntitiesRequest`):
Expand Down Expand Up @@ -922,8 +937,9 @@ async def batch_update_entities(
type. This method does not affect entities in the entity type
that aren't explicitly specified in the request.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]>
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.BatchUpdateEntitiesRequest`):
Expand Down Expand Up @@ -1041,8 +1057,9 @@ async def batch_delete_entities(
) -> operation_async.AsyncOperation:
r"""Deletes entities in the specified entity type.
Operation <response:
[google.protobuf.Empty][google.protobuf.Empty]>
Note: You should always train an agent prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/es/docs/training>`__.
Args:
request (:class:`google.cloud.dialogflow_v2.types.BatchDeleteEntitiesRequest`):
Expand Down

0 comments on commit 37dece2

Please sign in to comment.