Beispiel #1
0
async def sample_delete_intent():
    # Create a client
    client = dialogflow_v2beta1.IntentsAsyncClient()

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

    # Make the request
    await client.delete_intent(request=request)
Beispiel #2
0
async def sample_get_intent():
    # Create a client
    client = dialogflow_v2beta1.IntentsAsyncClient()

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

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

    # Handle the response
    print(response)
Beispiel #3
0
async def sample_list_intents():
    # Create a client
    client = dialogflow_v2beta1.IntentsAsyncClient()

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

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

    # Handle the response
    async for response in page_result:
        print(response)
Beispiel #4
0
async def sample_update_intent():
    # Create a client
    client = dialogflow_v2beta1.IntentsAsyncClient()

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

    request = dialogflow_v2beta1.UpdateIntentRequest(intent=intent, )

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

    # Handle the response
    print(response)
Beispiel #5
0
async def sample_batch_update_intents():
    # Create a client
    client = dialogflow_v2beta1.IntentsAsyncClient()

    # 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 = await operation.result()

    # Handle the response
    print(response)
Beispiel #6
0
async def sample_batch_delete_intents():
    # Create a client
    client = dialogflow_v2beta1.IntentsAsyncClient()

    # 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 = await operation.result()

    # Handle the response
    print(response)