mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-05 05:52:16 +00:00
In this feature update, we add the UI for the ability to easily configure persona backed AI-features. The feature will still be hidden until structured responses are complete.
13 lines
315 B
Ruby
13 lines
315 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AiFeaturesPersonaSerializer < ApplicationSerializer
|
|
attributes :id, :name, :system_prompt, :allowed_groups, :enabled
|
|
|
|
def allowed_groups
|
|
Group
|
|
.where(id: object.allowed_group_ids)
|
|
.pluck(:id, :name)
|
|
.map { |id, name| { id: id, name: name } }
|
|
end
|
|
end
|