Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: added notes to train agent before sending queries (#111)
PiperOrigin-RevId: 380267079

Source-Link: googleapis/googleapis@01bad53

Source-Link: googleapis/googleapis-gen@5810da6
  • Loading branch information
gcf-owl-bot[bot] committed Jun 19, 2021
1 parent 40974f5 commit 8a53800
Show file tree
Hide file tree
Showing 20 changed files with 268 additions and 24 deletions.
17 changes: 15 additions & 2 deletions google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py
Expand Up @@ -354,6 +354,10 @@ async def create_agent(
) -> gcdc_agent.Agent:
r"""Creates an agent in the specified location.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (:class:`google.cloud.dialogflowcx_v3beta1.types.CreateAgentRequest`):
The request object. The request message for
Expand Down Expand Up @@ -445,6 +449,10 @@ async def update_agent(
) -> gcdc_agent.Agent:
r"""Updates the specified agent.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (:class:`google.cloud.dialogflowcx_v3beta1.types.UpdateAgentRequest`):
The request object. The request message for
Expand Down Expand Up @@ -661,9 +669,14 @@ async def restore_agent(
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Restores the specified agent from a binary file.
Replaces the current agent with a new one. Note that all
existing resources in agent (e.g. intents, entity types,
flows) will be removed.
existing resources in agent (e.g. intents, entity types, flows)
will be removed.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (:class:`google.cloud.dialogflowcx_v3beta1.types.RestoreAgentRequest`):
Expand Down
17 changes: 15 additions & 2 deletions google/cloud/dialogflowcx_v3beta1/services/agents/client.py
Expand Up @@ -615,6 +615,10 @@ def create_agent(
) -> gcdc_agent.Agent:
r"""Creates an agent in the specified location.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (google.cloud.dialogflowcx_v3beta1.types.CreateAgentRequest):
The request object. The request message for
Expand Down Expand Up @@ -706,6 +710,10 @@ def update_agent(
) -> gcdc_agent.Agent:
r"""Updates the specified agent.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (google.cloud.dialogflowcx_v3beta1.types.UpdateAgentRequest):
The request object. The request message for
Expand Down Expand Up @@ -923,9 +931,14 @@ def restore_agent(
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Restores the specified agent from a binary file.
Replaces the current agent with a new one. Note that all
existing resources in agent (e.g. intents, entity types,
flows) will be removed.
existing resources in agent (e.g. intents, entity types, flows)
will be removed.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (google.cloud.dialogflowcx_v3beta1.types.RestoreAgentRequest):
Expand Down
Expand Up @@ -300,6 +300,10 @@ def create_agent(
Creates an agent in the specified location.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.CreateAgentRequest],
~.Agent]:
Expand All @@ -326,6 +330,10 @@ def update_agent(
Updates the specified agent.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.UpdateAgentRequest],
~.Agent]:
Expand Down Expand Up @@ -401,9 +409,14 @@ def restore_agent(
r"""Return a callable for the restore agent method over gRPC.
Restores the specified agent from a binary file.
Replaces the current agent with a new one. Note that all
existing resources in agent (e.g. intents, entity types,
flows) will be removed.
existing resources in agent (e.g. intents, entity types, flows)
will be removed.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.RestoreAgentRequest],
Expand Down
Expand Up @@ -305,6 +305,10 @@ def create_agent(
Creates an agent in the specified location.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.CreateAgentRequest],
Awaitable[~.Agent]]:
Expand All @@ -331,6 +335,10 @@ def update_agent(
Updates the specified agent.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.UpdateAgentRequest],
Awaitable[~.Agent]]:
Expand Down Expand Up @@ -408,9 +416,14 @@ def restore_agent(
r"""Return a callable for the restore agent method over gRPC.
Restores the specified agent from a binary file.
Replaces the current agent with a new one. Note that all
existing resources in agent (e.g. intents, entity types,
flows) will be removed.
existing resources in agent (e.g. intents, entity types, flows)
will be removed.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.RestoreAgentRequest],
Expand Down
Expand Up @@ -469,6 +469,10 @@ async def update_entity_type(
) -> gcdc_entity_type.EntityType:
r"""Updates the specified entity type.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (:class:`google.cloud.dialogflowcx_v3beta1.types.UpdateEntityTypeRequest`):
The request object. The request message for
Expand Down Expand Up @@ -581,6 +585,10 @@ async def delete_entity_type(
) -> None:
r"""Deletes the specified entity type.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (:class:`google.cloud.dialogflowcx_v3beta1.types.DeleteEntityTypeRequest`):
The request object. The request message for
Expand Down
Expand Up @@ -658,6 +658,10 @@ def update_entity_type(
) -> gcdc_entity_type.EntityType:
r"""Updates the specified entity type.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (google.cloud.dialogflowcx_v3beta1.types.UpdateEntityTypeRequest):
The request object. The request message for
Expand Down Expand Up @@ -770,6 +774,10 @@ def delete_entity_type(
) -> None:
r"""Deletes the specified entity type.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (google.cloud.dialogflowcx_v3beta1.types.DeleteEntityTypeRequest):
The request object. The request message for
Expand Down
Expand Up @@ -317,6 +317,10 @@ def update_entity_type(
Updates the specified entity type.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.UpdateEntityTypeRequest],
~.EntityType]:
Expand All @@ -343,6 +347,10 @@ def delete_entity_type(
Deletes the specified entity type.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.DeleteEntityTypeRequest],
~.Empty]:
Expand Down
Expand Up @@ -325,6 +325,10 @@ def update_entity_type(
Updates the specified entity type.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.UpdateEntityTypeRequest],
Awaitable[~.EntityType]]:
Expand All @@ -351,6 +355,10 @@ def delete_entity_type(
Deletes the specified entity type.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.DeleteEntityTypeRequest],
Awaitable[~.Empty]]:
Expand Down
24 changes: 20 additions & 4 deletions google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py
Expand Up @@ -188,6 +188,10 @@ async def create_flow(
) -> gcdc_flow.Flow:
r"""Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (:class:`google.cloud.dialogflowcx_v3beta1.types.CreateFlowRequest`):
The request object. The request message for
Expand Down Expand Up @@ -524,6 +528,10 @@ async def update_flow(
) -> gcdc_flow.Flow:
r"""Updates the specified flow.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (:class:`google.cloud.dialogflowcx_v3beta1.types.UpdateFlowRequest`):
The request object. The request message for
Expand Down Expand Up @@ -624,8 +632,12 @@ async def train_flow(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Trains the specified flow. Note that only the flow in
'draft' environment is trained.
r"""Trains the specified flow. Note that only the flow in 'draft'
environment is trained.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (:class:`google.cloud.dialogflowcx_v3beta1.types.TrainFlowRequest`):
Expand Down Expand Up @@ -840,8 +852,12 @@ async def import_flow(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Imports the specified flow to the specified agent
from a binary file.
r"""Imports the specified flow to the specified agent from a binary
file.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (:class:`google.cloud.dialogflowcx_v3beta1.types.ImportFlowRequest`):
Expand Down
24 changes: 20 additions & 4 deletions google/cloud/dialogflowcx_v3beta1/services/flows/client.py
Expand Up @@ -457,6 +457,10 @@ def create_flow(
) -> gcdc_flow.Flow:
r"""Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (google.cloud.dialogflowcx_v3beta1.types.CreateFlowRequest):
The request object. The request message for
Expand Down Expand Up @@ -793,6 +797,10 @@ def update_flow(
) -> gcdc_flow.Flow:
r"""Updates the specified flow.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (google.cloud.dialogflowcx_v3beta1.types.UpdateFlowRequest):
The request object. The request message for
Expand Down Expand Up @@ -893,8 +901,12 @@ def train_flow(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Trains the specified flow. Note that only the flow in
'draft' environment is trained.
r"""Trains the specified flow. Note that only the flow in 'draft'
environment is trained.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (google.cloud.dialogflowcx_v3beta1.types.TrainFlowRequest):
Expand Down Expand Up @@ -1112,8 +1124,12 @@ def import_flow(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Imports the specified flow to the specified agent
from a binary file.
r"""Imports the specified flow to the specified agent from a binary
file.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Args:
request (google.cloud.dialogflowcx_v3beta1.types.ImportFlowRequest):
Expand Down
Expand Up @@ -247,6 +247,10 @@ def create_flow(self) -> Callable[[gcdc_flow.CreateFlowRequest], gcdc_flow.Flow]
Creates a flow in the specified agent.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.CreateFlowRequest],
~.Flow]:
Expand Down Expand Up @@ -343,6 +347,10 @@ def update_flow(self) -> Callable[[gcdc_flow.UpdateFlowRequest], gcdc_flow.Flow]
Updates the specified flow.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.UpdateFlowRequest],
~.Flow]:
Expand All @@ -365,8 +373,12 @@ def update_flow(self) -> Callable[[gcdc_flow.UpdateFlowRequest], gcdc_flow.Flow]
def train_flow(self) -> Callable[[flow.TrainFlowRequest], operations_pb2.Operation]:
r"""Return a callable for the train flow method over gRPC.
Trains the specified flow. Note that only the flow in
'draft' environment is trained.
Trains the specified flow. Note that only the flow in 'draft'
environment is trained.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.TrainFlowRequest],
Expand Down Expand Up @@ -448,8 +460,12 @@ def import_flow(
) -> Callable[[flow.ImportFlowRequest], operations_pb2.Operation]:
r"""Return a callable for the import flow method over gRPC.
Imports the specified flow to the specified agent
from a binary file.
Imports the specified flow to the specified agent from a binary
file.
Note: You should always train a flow prior to sending it
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Returns:
Callable[[~.ImportFlowRequest],
Expand Down

0 comments on commit 8a53800

Please sign in to comment.