lib/langchainrb_overrides/vectorsearch/pgvector.rb in langchainrb_rails-0.1.9 vs lib/langchainrb_overrides/vectorsearch/pgvector.rb in langchainrb_rails-0.1.11
- old
+ new
@@ -53,9 +53,19 @@
def update_texts(texts:, ids:)
add_texts(texts: texts, ids: ids)
end
+ # Remove vectors from the index
+ #
+ # @param ids [Array<String>] The ids of the vectors to remove
+ # @return [Boolean] true
+ def remove_texts(ids:)
+ # Since the record is being destroyed and the `embedding` is a column on the record,
+ # we don't need to do anything here.
+ true
+ end
+
# Invoke a rake task that will create an initializer (`config/initializers/langchain.rb`) file
# and db/migrations/* files
def create_default_schema
Rake::Task["pgvector"].invoke
end