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

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

    # Make the request
    client.delete_context(request=request)
Exemplo n.º 2
0
def sample_delete_all_contexts():
    # Create a client
    client = dialogflow_v2beta1.ContextsClient()

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

    # Make the request
    client.delete_all_contexts(request=request)
Exemplo n.º 3
0
def sample_create_context():
    # Create a client
    client = dialogflow_v2beta1.ContextsClient()

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

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

    # Handle the response
    print(response)
Exemplo n.º 4
0
def sample_get_context():
    # Create a client
    client = dialogflow_v2beta1.ContextsClient()

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

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

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

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

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

    # Handle the response
    for response in page_result:
        print(response)