async def sample_get_conversation():
    # Create a client
    client = dialogflow_v2.ConversationsAsyncClient()

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

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

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

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

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

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

    # 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 = await client.create_conversation(request=request)

    # Handle the response
    print(response)