Skip to content

Conversation

andyw8
Copy link
Contributor

@andyw8 andyw8 commented Apr 25, 2025

Only a few minor changes were needed.

@andyw8 andyw8 changed the title Update streaming tutorial for Rails 8 Update streaming chat tutorial for Rails 8 Apr 25, 2025
include ActionView::RecordIdentifier

enum role: { system: 0, assistant: 10, user: 20 }
enum :role, { system: 0, assistant: 10, user: 20 }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

```ruby
# app/controllers/chats_controller.rb
class ChatsController < ApplicationController
respond_to :html
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise it fails with In order to use respond_with, first you need to declare the formats your controller responds to in the class level..

@andyw8 andyw8 marked this pull request as ready for review April 25, 2025 16:42
@andyw8
Copy link
Contributor Author

andyw8 commented Apr 25, 2025

btw, it works with ActiveJob/SolidQueue with some minor changes, no need for Redis or Sidekiq - I can make a separate PR for that, if you'd like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant