Skip to content

Commit 16005a1

Browse files
Add ruby-openai gem by default, reverse order of instructions
1 parent 83a6648 commit 16005a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/langchainrb_rails/generators/langchainrb_rails/pgvector_generator.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ def add_to_model
3232
def add_to_gemfile
3333
# Dependency for Langchain PgVector
3434
gem "neighbor"
35+
gem "ruby-openai"
3536
end
3637

3738
def post_install_message
3839
say "Please do the following to start Q&A with your #{model_name} records:", :green
3940
say "1. Run `bundle install` to install the new gems."
40-
say "2. Run `rails db:migrate` to apply the database migrations to enable pgvector and add the embedding column."
41-
say "3. Set the env var OPENAI_API_KEY to your OpenAI API key."
41+
say "2. Set `OPENAI_API_KEY` environment variable to your OpenAI API key."
42+
say "3. Run `rails db:migrate` to apply the database migrations to enable pgvector and add the embedding column."
4243
say "4. In Rails console, run `#{model_name}.embed!` to set the embeddings for all records."
4344
say "5. Ask a question in the Rails console, ie: `#{model_name}.ask('[YOUR QUESTION]')`"
4445
end

0 commit comments

Comments
 (0)