Class: LangchainrbRails::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/langchainrb_rails/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



13
14
15
16
# File 'lib/langchainrb_rails/config.rb', line 13

def initialize
  # Define the defaults for future configuration here
  @vectorsearch = {}
end

Instance Attribute Details

#vectorsearchObject

This class is used to configure the gem config inside Rails apps, in the ‘config/initializers/langchainrb_rails.rb` file.

Langchain is configured in the following way:

LangchainrbRails.configure do |config|
  config.vectorsearch = ...
end


11
12
13
# File 'lib/langchainrb_rails/config.rb', line 11

def vectorsearch
  @vectorsearch
end