Exemplo n.º 1
0
def sample_delete_intent():
    # Create a client
    client = dialogflow_v2beta1.IntentsClient()

    # Initialize request argument(s)
    request = dialogflow_v2beta1.DeleteIntentRequest(name="name_value", )

    # Make the request
    client.delete_intent(request=request)
def sample_get_intent():
    # Create a client
    client = dialogflow_v2beta1.IntentsClient()

    # Initialize request argument(s)
    request = dialogflow_v2beta1.GetIntentRequest(name="name_value", )

    # Make the request
    response = client.get_intent(request=request)

    # Handle the response
    print(response)
def sample_list_intents():
    # Create a client
    client = dialogflow_v2beta1.IntentsClient()

    # Initialize request argument(s)
    request = dialogflow_v2beta1.ListIntentsRequest(parent="parent_value", )

    # Make the request
    page_result = client.list_intents(request=request)

    # Handle the response
    for response in page_result:
        print(response)
def sample_update_intent():
    # Create a client
    client = dialogflow_v2beta1.IntentsClient()

    # Initialize request argument(s)
    intent = dialogflow_v2beta1.Intent()
    intent.display_name = "display_name_value"

    request = dialogflow_v2beta1.UpdateIntentRequest(intent=intent, )

    # Make the request
    response = client.update_intent(request=request)

    # Handle the response
    print(response)
Exemplo n.º 5
0
def sample_batch_update_intents():
    # Create a client
    client = dialogflow_v2beta1.IntentsClient()

    # Initialize request argument(s)
    request = dialogflow_v2beta1.BatchUpdateIntentsRequest(
        intent_batch_uri="intent_batch_uri_value",
        parent="parent_value",
    )

    # Make the request
    operation = client.batch_update_intents(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
def sample_batch_delete_intents():
    # Create a client
    client = dialogflow_v2beta1.IntentsClient()

    # Initialize request argument(s)
    intents = dialogflow_v2beta1.Intent()
    intents.display_name = "display_name_value"

    request = dialogflow_v2beta1.BatchDeleteIntentsRequest(
        parent="parent_value",
        intents=intents,
    )

    # Make the request
    operation = client.batch_delete_intents(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)