-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.rb
34 lines (29 loc) · 1.05 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
require_relative 'lib/redmine_gtt_assistant'
require_relative 'lib/redmine_gtt_assistant/view_hooks'
# Register the Redmine plugin
Redmine::Plugin.register :redmine_gtt_assistant do
# Set plugin metadata
name 'Redmine GTT Assistant plugin'
author 'Georepublic'
author_url 'https://github.com/georepublic'
url 'https://github.com/gtt-project/redmine_gtt_assistant'
description 'Get some help from your smart assistant'
version '0.2.0'
# Define the minimum required Redmine version for this plugin
requires_redmine :version_or_higher => '5.1.0'
# Configure plugin settings with default values and a partial view for settings
settings(
default: {
'openai_model' => 'gpt-40-mini',
'max_tokens' => 1000,
'temperature' => 1.0,
'request_timeout' => 120,
},
partial: 'gtt_assistant/settings'
)
# Define a project module for the GTT Assistant plugin
project_module :gtt_assistant do
# Set the permission required to view GTT Assistant
permission :view_gtt_assistant, {}, :require => :loggedin
end
end