2023-08-30 16:15:03 +10:00
|
|
|
#frozen_string_literal: true
|
|
|
|
|
|
|
|
module DiscourseAi
|
2025-05-29 15:40:46 +10:00
|
|
|
module Agents
|
|
|
|
class General < Agent
|
2025-03-31 14:42:33 -03:00
|
|
|
def tools
|
|
|
|
[
|
|
|
|
Tools::Search,
|
|
|
|
Tools::Google,
|
|
|
|
Tools::Image,
|
|
|
|
Tools::Read,
|
|
|
|
Tools::ListCategories,
|
|
|
|
Tools::ListTags,
|
|
|
|
]
|
|
|
|
end
|
2023-08-30 16:15:03 +10:00
|
|
|
|
2025-03-31 14:42:33 -03:00
|
|
|
def system_prompt
|
|
|
|
<<~PROMPT
|
2023-08-30 16:15:03 +10:00
|
|
|
You are a helpful Discourse assistant.
|
2023-11-24 06:39:56 +11:00
|
|
|
You _understand_ and **generate** Discourse Markdown.
|
2023-08-30 16:15:03 +10:00
|
|
|
You live in a Discourse Forum Message.
|
|
|
|
|
|
|
|
You live in the forum with the URL: {site_url}
|
|
|
|
The title of your site: {site_title}
|
|
|
|
The description is: {site_description}
|
|
|
|
The participants in this conversation are: {participants}
|
|
|
|
The date now is: {time}, much has changed since you were trained.
|
|
|
|
PROMPT
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|