async def sample_delete_knowledge_base():
    # Create a client
    client = dialogflow_v2.KnowledgeBasesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.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_v2.KnowledgeBasesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.GetKnowledgeBaseRequest(name="name_value", )

    # Make the request
    response = await client.get_knowledge_base(request=request)

    # Handle the response
    print(response)
示例#3
0
async def sample_list_knowledge_bases():
    # Create a client
    client = dialogflow_v2.KnowledgeBasesAsyncClient()

    # Initialize request argument(s)
    request = dialogflow_v2.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)
示例#4
0
async def sample_update_knowledge_base():
    # Create a client
    client = dialogflow_v2.KnowledgeBasesAsyncClient()

    # Initialize request argument(s)
    knowledge_base = dialogflow_v2.KnowledgeBase()
    knowledge_base.display_name = "display_name_value"

    request = dialogflow_v2.UpdateKnowledgeBaseRequest(
        knowledge_base=knowledge_base, )

    # Make the request
    response = await client.update_knowledge_base(request=request)

    # Handle the response
    print(response)