Skip to content

Commit 49ad284

Browse files
ActiveRecord model is only applicable to Pgvector integration (#18)
1 parent 318451a commit 49ad284

File tree

1 file changed

+1
-2
lines changed
  • lib/langchainrb_rails/active_record

1 file changed

+1
-2
lines changed

lib/langchainrb_rails/active_record/hooks.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ def vectorsearch
7676
# Pgvector-specific configuration
7777
if LangchainrbRails.config.vectorsearch.is_a?(Langchain::Vectorsearch::Pgvector)
7878
has_neighbors(:embedding)
79+
LangchainrbRails.config.vectorsearch.model = self
7980
end
80-
81-
LangchainrbRails.config.vectorsearch.model = self
8281
end
8382

8483
# Iterates over records and generate embeddings.

0 commit comments

Comments
 (0)