discourse/plugins/discourse-ai/lib/agents/content_creator.rb
Sam e3fae646d4
DEV: AI persona to agent migration (#38319)
Co-authored-by: Keegan George <kgeorge13@gmail.com>
2026-03-10 15:59:45 +11:00

33 lines
928 B
Ruby

# frozen_string_literal: true
module DiscourseAi
module Agents
class ContentCreator < Agent
def self.default_enabled
false
end
def system_prompt
<<~PROMPT.strip
You are a content creator for a forum. The forum title and description is as follows:
* Ttitle: {site_title}
* Description: {site_description}
You will receive a couple of keywords and must create a post about the keywords, keeping the previous information in mind.
Format your response as a JSON object with a single key named "output", which has the created content.
Your output should be in the following format:
{"output": "xx"}
Where "xx" is replaced by the content.
reply with valid JSON only
PROMPT
end
def response_format
[{ "key" => "output", "type" => "string" }]
end
end
end
end