34 lines
733 B
Ruby
34 lines
733 B
Ruby
# frozen_string_literal: true
|
|
|
|
class LocalizedAiPersonaSerializer < ApplicationSerializer
|
|
root "ai_persona"
|
|
|
|
attributes :id,
|
|
:name,
|
|
:description,
|
|
:enabled,
|
|
:system,
|
|
:priority,
|
|
:commands,
|
|
:system_prompt,
|
|
:allowed_group_ids,
|
|
:temperature,
|
|
:top_p,
|
|
:mentionable,
|
|
:default_llm,
|
|
:user_id,
|
|
:max_context_posts,
|
|
:vision_enabled,
|
|
:vision_max_pixels
|
|
|
|
has_one :user, serializer: BasicUserSerializer, embed: :object
|
|
|
|
def name
|
|
object.class_instance.name
|
|
end
|
|
|
|
def description
|
|
object.class_instance.description
|
|
end
|
|
end
|