def sample_complete_conversation():
    # Create a client
    client = dialogflow_v2.ConversationsClient()

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

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

    # Handle the response
    print(response)
Пример #2
0
def sample_list_conversations():
    # Create a client
    client = dialogflow_v2.ConversationsClient()

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

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

    # Handle the response
    for response in page_result:
        print(response)
def sample_create_conversation():
    # Create a client
    client = dialogflow_v2.ConversationsClient()

    # Initialize request argument(s)
    conversation = dialogflow_v2.Conversation()
    conversation.conversation_profile = "conversation_profile_value"

    request = dialogflow_v2.CreateConversationRequest(
        parent="parent_value",
        conversation=conversation,
    )

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

    # Handle the response
    print(response)