Chat Agent

Episode #501 by Teacher's Avatar David Kimura

Summary

In this episode, we lay down the ground work to have a chat agent in our Rails application. We'll be creating this from complete scratch and set it up in a way that you can have responses generated however you want.
rails stimulusjs view 23:38

Chapters

  • Introduction (0:00)
  • Creating the stimulus controller (2:06)
  • Creating the Chat Agent view (2:49)
  • Creating the toggle function (8:18)
  • Testing the view (8:48)
  • Generating a model for the messages (9:11)
  • Finishing the stimulus controller (10:08)
  • Creating the Chat Messages Controller (12:02)
  • Setting up the broadcasts (12:58)
  • Generating the background job (15:25)
  • Populating Chat Messages from Session (15:46)
  • Creating the routes (16:15)
  • Demo (16:26)
  • Responding with a LLM (16:54)
  • Auto scroll down feature (19:46)
  • Demo (21:38)
  • Final Thoughts (22:04)
Student & Teacher
$ 9 /mo

Valid School Email Required

Same Access as Pro

Subscribe Now
Pro Monthly
$ 19 /mo

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Pro Annual
$ 190 /yr

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Teams
$ 57 /mo

3 Users Minimum

$19.00 / user / month

Same Access as Pro

Subscribe to Teams