async def sample_delete_agent(): # Create a client client = dialogflow_v2.AgentsAsyncClient() # Initialize request argument(s) request = dialogflow_v2.DeleteAgentRequest(parent="parent_value", ) # Make the request await client.delete_agent(request=request)
async def sample_get_agent(): # Create a client client = dialogflow_v2.AgentsAsyncClient() # Initialize request argument(s) request = dialogflow_v2.GetAgentRequest(parent="parent_value", ) # Make the request response = await client.get_agent(request=request) # Handle the response print(response)
async def sample_search_agents(): # Create a client client = dialogflow_v2.AgentsAsyncClient() # Initialize request argument(s) request = dialogflow_v2.SearchAgentsRequest(parent="parent_value", ) # Make the request page_result = client.search_agents(request=request) # Handle the response async for response in page_result: print(response)
async def sample_train_agent(): # Create a client client = dialogflow_v2.AgentsAsyncClient() # Initialize request argument(s) request = dialogflow_v2.TrainAgentRequest(parent="parent_value", ) # Make the request operation = client.train_agent(request=request) print("Waiting for operation to complete...") response = await operation.result() # Handle the response print(response)
async def sample_set_agent(): # Create a client client = dialogflow_v2.AgentsAsyncClient() # Initialize request argument(s) agent = dialogflow_v2.Agent() agent.parent = "parent_value" agent.display_name = "display_name_value" agent.default_language_code = "default_language_code_value" agent.time_zone = "time_zone_value" request = dialogflow_v2.SetAgentRequest(agent=agent, ) # Make the request response = await client.set_agent(request=request) # Handle the response print(response)