From 310bb98f853d3e1a18620dfc5bfb0f92271a2254 Mon Sep 17 00:00:00 2001 From: Yago Fontenla Seco Date: Mon, 22 May 2023 19:21:26 +0200 Subject: [PATCH] fix endpoint parsing in jupyter.py Added parsing of the endpoints.yml file when using the chat method of the jupyter.py class. This was causing the error `AttributeError: 'str' object has no attribute 'event_broker'` when creating an agent inside the jupyer.chat method --- rasa/jupyter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rasa/jupyter.py b/rasa/jupyter.py index 668d58b7fb7b..e21cad2c0267 100644 --- a/rasa/jupyter.py +++ b/rasa/jupyter.py @@ -29,6 +29,10 @@ def chat( endpoints: Path to a yaml with the action server is custom actions are defined. agent: Rasa Core agent (used if no Rasa model given). """ + + from rasa.core.utils import AvailableEndpoints + _endpoints = AvailableEndpoints.read_endpoints(endpoints) + if model_path: agent = asyncio.run( rasa.core.agent.load_agent(model_path=model_path, endpoints=endpoints)