async def sample_get_conversation(): # Create a client client = dialogflow_v2beta1.ConversationsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.GetConversationRequest(name="name_value", ) # Make the request response = await client.get_conversation(request=request) # Handle the response print(response)
async def sample_list_messages(): # Create a client client = dialogflow_v2beta1.ConversationsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.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)
async def sample_create_conversation(): # Create a client client = dialogflow_v2beta1.ConversationsAsyncClient() # Initialize request argument(s) conversation = dialogflow_v2beta1.Conversation() conversation.conversation_profile = "conversation_profile_value" request = dialogflow_v2beta1.CreateConversationRequest( parent="parent_value", conversation=conversation, ) # Make the request response = await client.create_conversation(request=request) # Handle the response print(response)
async def sample_batch_create_messages(): # Create a client client = dialogflow_v2beta1.ConversationsAsyncClient() # Initialize request argument(s) requests = dialogflow_v2beta1.CreateMessageRequest() requests.parent = "parent_value" requests.message.content = "content_value" request = dialogflow_v2beta1.BatchCreateMessagesRequest( parent="parent_value", requests=requests, ) # Make the request response = await client.batch_create_messages(request=request) # Handle the response print(response)