If i put ‘hi’ or other, it works and returns the value, but if i put something to process the custom action, write in log but doesn’t returns nothing. Is like work ok from rasa to actions but can’t exit from action image.
All the code could be found here: https://github.com/ideivitcom/rasa_demo.git
Custom action;:
class definition(Action):
def name(self):
return "definition"
def run(self, dispatcher, tracker, domain):
logger.info("Entro por aqui")
request = requests.get('http://api.icndb.com/jokes/random').json() # make an api call
joke = request['value']['joke'] # extract a joke from returned json response
logger.info("Devuelvo esto: {}".format(joke))
dispatcher.utter_message(joke) # send the message back to the user
return []
End point: action_endpoint: url: “http://action_server:5055/webhook”
config:
Configuration for Rasa NLU.
Components
language: en
pipeline: supervised_embeddings
Configuration for Rasa Core.
Policies
policies:
-
name: MemoizationPolicy
-
name: KerasPolicy
-
name: MappingPolicy
Docker-compose:
version: '3.0' services: rasa: image: rasa/rasa:latest-full ports: - 5005:5005 volumes: - ./:/app command: - run action_server: image: rasa/rasa-sdk:latest volumes: - ./actions:/app/actions