File size: 963 Bytes
0827183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.


class DialogPath:
    # Counter of emitted events.
    EVENT_COUNTER = "dialog.eventCounter"

    # Currently expected properties.
    EXPECTED_PROPERTIES = "dialog.expectedProperties"

    # Default operation to use for entities where there is no identified operation entity.
    DEFAULT_OPERATION = "dialog.defaultOperation"

    # Last surfaced entity ambiguity event.
    LAST_EVENT = "dialog.lastEvent"

    # Currently required properties.
    REQUIRED_PROPERTIES = "dialog.requiredProperties"

    # Number of retries for the current Ask.
    RETRIES = "dialog.retries"

    # Last intent.
    LAST_INTENT = "dialog.lastIntent"

    # Last trigger event: defined in FormEvent, ask, clarifyEntity etc..
    LAST_TRIGGER_EVENT = "dialog.lastTriggerEvent"

    @staticmethod
    def get_property_name(prop: str) -> str:
        return prop.replace("dialog.", "")