mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-10 08:03:28 +00:00
You can now edit each AI helper prompt individually through personas, limit access to specific groups, set different LLMs, etc.
23 lines
495 B
Ruby
23 lines
495 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseAi
|
|
module Personas
|
|
class CustomPrompt < Persona
|
|
def self.default_enabled
|
|
false
|
|
end
|
|
|
|
def system_prompt
|
|
<<~PROMPT.strip
|
|
You are a helpful assistant. I will give you instructions inside <input></input> XML tags.
|
|
You will look at them and reply with a result.
|
|
PROMPT
|
|
end
|
|
|
|
def response_format
|
|
[{ "key" => "output", "type" => "string" }]
|
|
end
|
|
end
|
|
end
|
|
end
|