- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 33
 
Open
Description
During installation, I had problems as I expected the collection in the vectorstore to be created automatically.
I would like to propose inserting the auto-generation of the vectorstore in an after_initialize.
Is this a valid solution in your opinion? I can do a PR if you think it is a good solution.
Below is a Proof of Concept of the solution:
module MyRailsApplication
  class Application < Rails::Application
    # ....
    # Run vectorsearch initialization after application is loaded.
    config.after_initialize do
      provider = LangchainrbRails.config.vectorsearch
      default_schema = provider.get_default_schema
      provider.create_default_schema if !default_schema ||  default_schema.dig('status') != 'ok'
    end
  end
endMetadata
Metadata
Assignees
Labels
No labels