-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NameError: uninitialized class variable @@provider #103
Comments
just some notes of minor issues that need to address but can be fixed manually: doing: rails generate langchainrb_rails:pgvector --model=SupportArticle --llm=openai didn't underscore the table name: class AddVectorColumnToSupportarticles < ActiveRecord::Migration[7.1]
def change
add_column :supportarticles, :embedding, :vector,
limit: LangchainrbRails
.config
.vectorsearch
.llm
.default_dimensions
end
end didn't add the openai gem either. |
If anyone else runs into the @@Provider exception message that @andreibondarev mentions here, double check that you've also explicitly added |
I'm wondering if there's a way to gracefully handle this error, like rescue-ing and then raising a specific error that points out that your model file is missing the |
I ran into an issue when attempting to run 'SupportArticle.embed!' via the Rails console.
I get the following error:
I followed the setup instructions to add pgvector and successfully migrated the db to add the 'embedding' vector column to my model 'SupportArticle'. I've also set my ENV["OPENAI_API_KEY"] which I can see correctly in the rails console, as well.
My gemfile includes the following:
The text was updated successfully, but these errors were encountered: