Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

17 lines (12 sloc) 675 Bytes
from import InMemoryKnowledgeBase
from rasa_sdk.knowledge_base.actions import ActionQueryKnowledgeBase
class ActionMyKB(ActionQueryKnowledgeBase):
def __init__(self):
# load knowledge base with data from the given file
knowledge_base = InMemoryKnowledgeBase("knowledge_base_data.json")
# overwrite the representation function of the hotel object
# by default the representation function is just the name of the object
"hotel", lambda obj: obj["name"] + " (" + obj["city"] + ")"
You can’t perform that action at this time.