Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

Commit

Permalink
feat: forward bot messages to output channel
Browse files Browse the repository at this point in the history
when using /conversations/<conversation_id>/tracker/events route
  • Loading branch information
Philippe Cote-Boucher committed Jul 1, 2020
1 parent 1d37e10 commit 29ed2fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rasa/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,14 @@ async def append_events(request: Request, conversation_id: Text):
async with app.agent.lock_store.lock(conversation_id):
processor = app.agent.create_processor()
tracker = processor.get_tracker(conversation_id)
output_channel = _get_output_channel(request, tracker) # bf
_validate_tracker(tracker, conversation_id)

events = _get_events_from_request_body(request)

for event in events:
tracker.update(event, app.agent.domain)
await processor._send_bot_messages(events, tracker, output_channel) # bf
app.agent.tracker_store.save(tracker)

return response.json(tracker.current_state(verbosity))
Expand Down

0 comments on commit 29ed2fe

Please sign in to comment.