Beispiel #1
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)
def sample_create_knowledge_base():
    # Create a client
    client = dialogflow_v2.KnowledgeBasesClient()

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

    request = dialogflow_v2.CreateKnowledgeBaseRequest(
        parent="parent_value",
        knowledge_base=knowledge_base,
    )

    # Make the request
    response = client.create_knowledge_base(request=request)

    # Handle the response
    print(response)