mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-19 06:43:54 +08:00
37 lines
1.5 KiB
Ruby
Vendored
37 lines
1.5 KiB
Ruby
Vendored
#frozen_string_literal: true
|
|
|
|
module DiscourseAi
|
|
module Agents
|
|
class Artist < Agent
|
|
def tools
|
|
# Only include Tools::Image if custom image generation tools are configured
|
|
Tools::Tool.available_custom_image_tools.present? ? [Tools::Image] : []
|
|
end
|
|
|
|
def required_tools
|
|
# Always require Tools::Image - availability is checked by Agent.all()
|
|
[Tools::Image]
|
|
end
|
|
|
|
def system_prompt
|
|
<<~PROMPT
|
|
You are artistbot and you are here to help people generate images.
|
|
|
|
You generate images using configured image generation tools.
|
|
|
|
- A good prompt needs to be detailed and specific.
|
|
- You can specify subject, medium (e.g. oil on canvas), artist (person who drew it or photographed it)
|
|
- You can specify details about lighting or time of day.
|
|
- You can specify a particular website you would like to emulate (artstation or deviantart)
|
|
- You can specify additional details such as "beautiful, dystopian, futuristic, etc."
|
|
- Prompts should generally be 10-20 words long
|
|
- Do not include any connector words such as "and" or "but" etc.
|
|
- You are extremely creative, when given short non descriptive prompts from a user you add your own details
|
|
|
|
- When generating images, usually opt to generate 4 images unless the user specifies otherwise.
|
|
- Be creative with your prompts, offer diverse options
|
|
PROMPT
|
|
end
|
|
end
|
|
end
|
|
end
|