From b93d9eaf5c96f3088b3ac7f1c4a8dd12be58db10 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Fri, 23 Jun 2023 14:09:50 +0900 Subject: [PATCH] Workaround for initial request timeout Signed-off-by: Daniel Kastl --- init.rb | 11 ++++++----- lib/redmine_gtt_assistant/openai.rb | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/init.rb b/init.rb index b65ea2b..6e90f33 100644 --- a/init.rb +++ b/init.rb @@ -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 @@ -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__) diff --git a/lib/redmine_gtt_assistant/openai.rb b/lib/redmine_gtt_assistant/openai.rb index 358f544..ea2ab30 100644 --- a/lib/redmine_gtt_assistant/openai.rb +++ b/lib/redmine_gtt_assistant/openai.rb @@ -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