def sample_delete_agent(): # Create a client client = dialogflow_v2.AgentsClient() # Initialize request argument(s) request = dialogflow_v2.DeleteAgentRequest(parent="parent_value", ) # Make the request client.delete_agent(request=request)
def sample_get_agent(): # Create a client client = dialogflow_v2.AgentsClient() # Initialize request argument(s) request = dialogflow_v2.GetAgentRequest(parent="parent_value", ) # Make the request response = client.get_agent(request=request) # Handle the response print(response)
def sample_search_agents(): # Create a client client = dialogflow_v2.AgentsClient() # Initialize request argument(s) request = dialogflow_v2.SearchAgentsRequest(parent="parent_value", ) # Make the request page_result = client.search_agents(request=request) # Handle the response for response in page_result: print(response)
def sample_train_agent(): # Create a client client = dialogflow_v2.AgentsClient() # 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 = operation.result() # Handle the response print(response)
def sample_set_agent(): # Create a client client = dialogflow_v2.AgentsClient() # 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 = client.set_agent(request=request) # Handle the response print(response)