From 6a1daf39ea0d7f903aa19b4c36e961a104543295 Mon Sep 17 00:00:00 2001 From: Hrag Balian Date: Sat, 1 Jun 2024 21:20:07 -0700 Subject: [PATCH 1/2] removed self.mode from the add statement since mode should be append (which is the default value) and create is not an option for add, but is only a mode option for create_table --- .../llama_index/vector_stores/lancedb/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/base.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/base.py index bd0c9ce962ce8..089097561d72e 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/base.py +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/base.py @@ -348,7 +348,7 @@ def add( self._table_name, data, mode=self.mode ) - self._table.add(data, mode=self.mode) + self._table.add(data) self._fts_index = None # reset fts index return ids From 814564ef6126922518da3f789a2525c2d591a2e9 Mon Sep 17 00:00:00 2001 From: Hrag Balian Date: Sun, 2 Jun 2024 16:19:19 -0700 Subject: [PATCH 2/2] added the **add_kwargs to handle options for add --- .../llama_index/vector_stores/lancedb/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/base.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/base.py index 089097561d72e..097479a66a070 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/base.py +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-lancedb/llama_index/vector_stores/lancedb/base.py @@ -348,7 +348,7 @@ def add( self._table_name, data, mode=self.mode ) - self._table.add(data) + self._table.add(data, **add_kwargs) self._fts_index = None # reset fts index return ids