Пример #1
0
async def sample_delete_environment():
    # Create a client
    client = dialogflow_v2.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.DeleteEnvironmentRequest(name="name_value", )

    # Make the request
    await client.delete_environment(request=request)
Пример #2
0
async def sample_update_environment():
    # Create a client
    client = dialogflow_v2.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.UpdateEnvironmentRequest()

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

    # Handle the response
    print(response)
async def sample_get_environment():
    # Create a client
    client = dialogflow_v2.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.GetEnvironmentRequest(name="name_value", )

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

    # Handle the response
    print(response)
async def sample_get_environment_history():
    # Create a client
    client = dialogflow_v2.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.GetEnvironmentHistoryRequest(
        parent="parent_value", )

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

    # Handle the response
    async for response in page_result:
        print(response)
Пример #5
0
async def sample_create_environment():
    # Create a client
    client = dialogflow_v2.EnvironmentsAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.CreateEnvironmentRequest(
        parent="parent_value",
        environment_id="environment_id_value",
    )

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

    # Handle the response
    print(response)