mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-03-06 09:20:14 +00:00
FIX: hardcoded require for evals (#1137)
The require for `discourse/config/environment` should point to the local user's core Discourse environment instead of the hardcoded path for Sam's env.
This commit is contained in:
parent
37bf160d26
commit
af47873f28
@ -24,12 +24,12 @@ if !Dir.exist?(EVAL_PATH)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
discourse_path = File.expand_path(File.join(__dir__, "../../../.."))
|
discourse_path = ENV["DISCOURSE_PATH"] || File.expand_path(File.join(__dir__, "../../../.."))
|
||||||
# rubocop:disable Discourse/NoChdir
|
# rubocop:disable Discourse/NoChdir
|
||||||
Dir.chdir(discourse_path)
|
Dir.chdir(discourse_path)
|
||||||
# rubocop:enable Discourse/NoChdir
|
# rubocop:enable Discourse/NoChdir
|
||||||
|
|
||||||
require "/home/sam/Source/discourse/config/environment"
|
require "#{discourse_path}/config/environment"
|
||||||
|
|
||||||
ENV["DISCOURSE_AI_NO_DEBUG"] = "1"
|
ENV["DISCOURSE_AI_NO_DEBUG"] = "1"
|
||||||
module DiscourseAi::Evals
|
module DiscourseAi::Evals
|
||||||
|
Loading…
x
Reference in New Issue
Block a user