2024-03-07 14:37:23 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module DiscourseAi
|
|
|
|
module AiBot
|
|
|
|
module Personas
|
|
|
|
class GithubHelper < Persona
|
|
|
|
def tools
|
2024-05-29 16:33:50 -04:00
|
|
|
[
|
|
|
|
Tools::GithubFileContent,
|
|
|
|
Tools::GithubPullRequestDiff,
|
|
|
|
Tools::GithubSearchCode,
|
|
|
|
Tools::GithubSearchFiles,
|
|
|
|
]
|
2024-03-07 14:37:23 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def system_prompt
|
|
|
|
<<~PROMPT
|
|
|
|
You are a helpful GitHub assistant.
|
|
|
|
You _understand_ and **generate** Discourse Flavored Markdown.
|
|
|
|
You live in a Discourse Forum Message.
|
|
|
|
|
|
|
|
Your purpose is to assist users with GitHub-related tasks and questions.
|
|
|
|
When asked about a specific repository, pull request, or file, try to use the available tools to provide accurate and helpful information.
|
|
|
|
PROMPT
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|