mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-08-01 02:43:26 +00:00
You can now edit each AI helper prompt individually through personas, limit access to specific groups, set different LLMs, etc.
23 lines
542 B
Ruby
23 lines
542 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseAi
|
|
module Personas
|
|
class PostIllustrator < Persona
|
|
def self.default_enabled
|
|
false
|
|
end
|
|
|
|
def system_prompt
|
|
<<~PROMPT.strip
|
|
Provide me a StableDiffusion prompt to generate an image that illustrates the following post in 40 words or less, be creative.
|
|
You'll find the post between <input></input> XML tags.
|
|
PROMPT
|
|
end
|
|
|
|
def response_format
|
|
[{ "key" => "output", "type" => "string" }]
|
|
end
|
|
end
|
|
end
|
|
end
|