async def sample_update_intent():
    # Create a client
    client = dialogflow_v2.IntentsAsyncClient()

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

    request = dialogflow_v2.UpdateIntentRequest(intent=intent, )

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

    # Handle the response
    print(response)
def sample_create_intent():
    # Create a client
    client = dialogflow_v2.IntentsClient()

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

    request = dialogflow_v2.CreateIntentRequest(
        parent="parent_value",
        intent=intent,
    )

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

    # Handle the response
    print(response)
Exemplo n.º 3
0
def sample_batch_delete_intents():
    # Create a client
    client = dialogflow_v2.IntentsClient()

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

    request = dialogflow_v2.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)