コード例 #1
0
async def sample_update_entity_type():
    # Create a client
    client = dialogflow_v2.EntityTypesAsyncClient()

    # Initialize request argument(s)
    entity_type = dialogflow_v2.EntityType()
    entity_type.display_name = "display_name_value"
    entity_type.kind = "KIND_REGEXP"

    request = dialogflow_v2.UpdateEntityTypeRequest(entity_type=entity_type, )

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

    # Handle the response
    print(response)
コード例 #2
0
def sample_create_entity_type():
    # Create a client
    client = dialogflow_v2.EntityTypesClient()

    # Initialize request argument(s)
    entity_type = dialogflow_v2.EntityType()
    entity_type.display_name = "display_name_value"
    entity_type.kind = "KIND_REGEXP"

    request = dialogflow_v2.CreateEntityTypeRequest(
        parent="parent_value",
        entity_type=entity_type,
    )

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

    # Handle the response
    print(response)