Skip to content

Commit a63272e

Browse files
authored
Use require_relative (patterns-ai-core#975)
If there are many searches in the `$LOAD_PATH` in the user environment, require will perform unnecessary searches that are not needed. In contrast, `require_relative` is efficient because it uses a relative path. Langchain.rb requires Ruby 3.1+, it is possible to use `require_relative`, which was introduced in Ruby 1.9: https://github.com/patterns-ai-core/langchainrb/blob/0.19.4/langchain.gemspec#L15
1 parent 9a711fd commit a63272e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/langchainrb.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
require "langchain"
1+
require_relative "langchain"

0 commit comments

Comments
 (0)