Beispiel #1
0
async def sample_delete_all_contexts():
    # Create a client
    client = dialogflow_v2.ContextsAsyncClient()

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

    # Make the request
    await client.delete_all_contexts(request=request)
Beispiel #2
0
async def sample_delete_context():
    # Create a client
    client = dialogflow_v2.ContextsAsyncClient()

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

    # Make the request
    await client.delete_context(request=request)
async def sample_get_context():
    # Create a client
    client = dialogflow_v2.ContextsAsyncClient()

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

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

    # Handle the response
    print(response)
Beispiel #4
0
async def sample_list_contexts():
    # Create a client
    client = dialogflow_v2.ContextsAsyncClient()

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

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

    # Handle the response
    async for response in page_result:
        print(response)
Beispiel #5
0
async def sample_update_context():
    # Create a client
    client = dialogflow_v2.ContextsAsyncClient()

    # Initialize request argument(s)
    context = dialogflow_v2.Context()
    context.name = "name_value"

    request = dialogflow_v2.UpdateContextRequest(context=context, )

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

    # Handle the response
    print(response)