async def sample_delete_knowledge_base(): # Create a client client = dialogflow_v2beta1.KnowledgeBasesAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.DeleteKnowledgeBaseRequest( name="name_value", ) # Make the request await client.delete_knowledge_base(request=request)
async def sample_get_knowledge_base(): # Create a client client = dialogflow_v2beta1.KnowledgeBasesAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.GetKnowledgeBaseRequest(name="name_value", ) # Make the request response = await client.get_knowledge_base(request=request) # Handle the response print(response)
async def sample_list_knowledge_bases(): # Create a client client = dialogflow_v2beta1.KnowledgeBasesAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.ListKnowledgeBasesRequest( parent="parent_value", ) # Make the request page_result = client.list_knowledge_bases(request=request) # Handle the response async for response in page_result: print(response)
async def sample_update_knowledge_base(): # Create a client client = dialogflow_v2beta1.KnowledgeBasesAsyncClient() # Initialize request argument(s) knowledge_base = dialogflow_v2beta1.KnowledgeBase() knowledge_base.display_name = "display_name_value" request = dialogflow_v2beta1.UpdateKnowledgeBaseRequest( knowledge_base=knowledge_base, ) # Make the request response = await client.update_knowledge_base(request=request) # Handle the response print(response)