Skip to content

Commit

Permalink
Workaround for initial request timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kastl <[email protected]>
  • Loading branch information
dkastl committed Jun 23, 2023
1 parent c6a1f3d commit b93d9ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions init.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Require the GTT Assistant library
require ::File.expand_path('lib/redmine_gtt_assistant', __dir__)

# Global hooks
require File.expand_path('../lib/redmine_gtt_assistant/view_hooks', __FILE__)

# Register the Redmine plugin
Redmine::Plugin.register :redmine_gtt_assistant do
# Set plugin metadata
Expand Down Expand Up @@ -29,8 +35,3 @@
end

end

# Require the GTT Assistant library
require ::File.expand_path('lib/redmine_gtt_assistant', __dir__)
# Global hooks
require File.expand_path('../lib/redmine_gtt_assistant/view_hooks', __FILE__)
3 changes: 2 additions & 1 deletion lib/redmine_gtt_assistant/openai.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def self.init
OpenAI.configure do |config|
config.access_token = ENV['OPENAI_API_KEY']
config.organization_id = ENV['OPENAI_API_ORG']
config.request_timeout = RedmineGttAssistant.request_timeout
# config.request_timeout = RedmineGttAssistant.request_timeout
config.request_timeout = 120
end
end

Expand Down

0 comments on commit b93d9ea

Please sign in to comment.