Logo
Explore Help
Sign In
discourse/discourse-ai
1
0
Fork 0
You've already forked discourse-ai
mirror of https://github.com/discourse/discourse-ai.git synced 2025-06-30 19:42:17 +00:00
Code Issues Packages Projects Releases Wiki Activity
discourse-ai/app/serializers/ai_features_persona_serializer.rb

13 lines
289 B
Ruby
Raw Permalink Normal View History

FEATURE: Configure persona backed features in admin panel (#1245) 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.
2025-04-10 08:16:31 -07:00
# frozen_string_literal: true
class AiFeaturesPersonaSerializer < ApplicationSerializer
DEV: Use a PORO to represent modules/features. (#1421) Additional changes: Adds a "#features" method in AiPersona to find which features are using that persona. Serializes a basic version of a LlmModel in the persona's "#default_llm" serializer attribute.
2025-06-10 14:37:53 -03:00
attributes :id, :name, :allowed_groups
FEATURE: Configure persona backed features in admin panel (#1245) 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.
2025-04-10 08:16:31 -07:00
def allowed_groups
Group
.where(id: object.allowed_group_ids)
.pluck(:id, :name)
.map { |id, name| { id: id, name: name } }
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 62ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API