Rasa在PyCharm中进行debug
actions服务调试
import os import sys sys.path.insert(1, os.path.dirname(os.path.abspath(__file__))) sys.argv.append('run') sys.argv.append('actions') from rasa.__main__ import main main()
Core服务调试
end_file = 'endpoints.yml' _endpoints = AvailableEndpoints.read_endpoints(end_file) _broker = _create_from_endpoint_config(_endpoints.event_broker) _tracker_store = TrackerStore.create(_endpoints.tracker_store, event_broker=_broker) _lock_store = LockStore.create(_endpoints.lock_store) agent = Agent.load(model_path=target, generator=_endpoints.nlg, tracker_store=_tracker_store, lock_store=_lock_store, action_endpoint=_endpoints.action)