async def sample_delete_all_contexts(): # Create a client client = dialogflow_v2beta1.ContextsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.DeleteAllContextsRequest( parent="parent_value", ) # Make the request await client.delete_all_contexts(request=request)
async def sample_delete_context(): # Create a client client = dialogflow_v2beta1.ContextsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.DeleteContextRequest( name="name_value", ) # Make the request await client.delete_context(request=request)
async def sample_create_context(): # Create a client client = dialogflow_v2beta1.ContextsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.CreateContextRequest(parent="parent_value", ) # Make the request response = await client.create_context(request=request) # Handle the response print(response)
async def sample_get_context(): # Create a client client = dialogflow_v2beta1.ContextsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.GetContextRequest(name="name_value", ) # Make the request response = await client.get_context(request=request) # Handle the response print(response)
async def sample_list_contexts(): # Create a client client = dialogflow_v2beta1.ContextsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.ListContextsRequest(parent="parent_value", ) # Make the request page_result = client.list_contexts(request=request) # Handle the response async for response in page_result: print(response)