mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-10 08:03:28 +00:00
* FEATURE: Tool name validation - Add unique index to the name column of the ai_tools table - correct our tests for AiToolController - tool_name field which will be used to represent to LLM - Add tool_name to Tools's presets - Add duplicate tools validation for AiPersona - Add unique constraint to the name column of the ai_tools table * DEV: Validate duplicate tool_name between builin tools and custom tools * lint * chore: fix linting * fix conlict mistakes * chore: correct icon class * chore: fix failed specs * Add max_length to tool_name * chore: correct the option name * lintings * fix lintings
35 lines
917 B
Ruby
35 lines
917 B
Ruby
#frozen_string_literal: true
|
|
|
|
module DiscourseAi
|
|
module AiBot
|
|
module Personas
|
|
class General < Persona
|
|
def tools
|
|
[
|
|
Tools::Search,
|
|
Tools::Google,
|
|
Tools::Image,
|
|
Tools::Read,
|
|
Tools::ListCategories,
|
|
Tools::ListTags,
|
|
]
|
|
end
|
|
|
|
def system_prompt
|
|
<<~PROMPT
|
|
You are a helpful Discourse assistant.
|
|
You _understand_ and **generate** Discourse Markdown.
|
|
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
|
|
end
|