Sha256: 8b4e938acb5def837b91697898370f5856d7c9a9c122b9ce25e6205a364840dc

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

require "forwardable"
require "langchain"
require "rails"
require_relative "langchainrb_rails/version"
require "langchainrb_rails/railtie"
require "langchainrb_rails/config"
require_relative "langchainrb_overrides/vectorsearch/pgvector"

module LangchainrbRails
  class Error < StandardError; end

  module ActiveRecord
    autoload :Hooks, "langchainrb_rails/active_record/hooks"
  end

  module Generators
    autoload :BaseGenerator, "langchainrb_rails/generators/langchainrb_rails/base_generator"
    autoload :ChromaGenerator, "langchainrb_rails/generators/langchainrb_rails/chroma_generator"
    autoload :PgvectorGenerator, "langchainrb_rails/generators/langchainrb_rails/pgvector_generator"
  end

  class << self
    # Configures global settings for LangchainrbRails
    #     LangchainrbRails.configure do |config|
    #       config.vectorsearch = ...
    #     end
    def configure
      yield(config)
    end

    # @return [Config] The global configuration object
    def config
      @_config ||= Config.new
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
langchainrb_rails-0.1.4 lib/langchainrb_rails.rb
langchainrb_rails-0.1.3 lib/langchainrb_rails.rb