diff --git a/enterprise/app/models/captain/assistant.rb b/enterprise/app/models/captain/assistant.rb index ea67b42cd..0423abf67 100644 --- a/enterprise/app/models/captain/assistant.rb +++ b/enterprise/app/models/captain/assistant.rb @@ -36,6 +36,8 @@ class Captain::Assistant < ApplicationRecord has_many :copilot_threads, dependent: :destroy_async has_many :scenarios, class_name: 'Captain::Scenario', dependent: :destroy_async + store_accessor :config, :temperature, :feature_faq, :feature_memory, :product_name + validates :name, presence: true validates :description, presence: true validates :account_id, presence: true diff --git a/enterprise/app/models/captain/scenario.rb b/enterprise/app/models/captain/scenario.rb index 23d50e400..aac7e2411 100644 --- a/enterprise/app/models/captain/scenario.rb +++ b/enterprise/app/models/captain/scenario.rb @@ -38,6 +38,8 @@ class Captain::Scenario < ApplicationRecord scope :enabled, -> { where(enabled: true) } + delegate :temperature, :feature_faq, :feature_memory, :product_name, to: :assistant + before_save :resolve_tool_references def prompt_context