Skip to content

Instantly share code, notes, and snippets.

@JustinaPetr
Created September 20, 2018 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JustinaPetr/16c66ca7c736bc7d1019e97f10139258 to your computer and use it in GitHub Desktop.
Save JustinaPetr/16c66ca7c736bc7d1019e97f10139258 to your computer and use it in GitHub Desktop.
from rasa_core.agent import Agent
from rasa_core.interpreter import RasaNLUInterpreter
from custom import GoogleConnector
from rasa_core.utils import EndpointConfig
action_endpoint = EndpointConfig(url="http://localhost:5055/webhook")
nlu_interpreter = RasaNLUInterpreter('./models/current/nlu_model')
agent = Agent.load('./models/current/dialogue', interpreter = nlu_interpreter, action_endpoint=action_endpoint)
input_channel = GoogleConnector()
agent.handle_channels([input_channel], 5004, serve_forever=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment