Skip to content

Commit 9cbae82

Browse files
feat: Spanner Implementation for Vector Store (#10)
* feat: Adding Vector Store Implementation for Spanner - Static Utility to create a table to store vector embeddings - Automatic Dialect Detection for GSQL and PG - Similarity Search & Maximal Marginal Relevance Search - Add documents and texts * feat: Validating Types, Columns at the time of VectorStore initialization & also while creating new table through static utility. * feat: Delete Vector embeddings through documents. * style: format and lint * feat: Adding init file to export VectorStore * feat: Adding delete to dynamically generate SQL for each row. * feat: Adding full support for staleness with multiple options like read_timestamp and min and exact staleness. * feat: Addressing review comments and adding data class for indexes. * feat: Adding support for secondary indexes. * feat: exporting secondary indexes. * style: lint * feat: Initiating client with user agent. * feat: Addressing review comments. * style: lint * style: lint * style: lint * test: Vector Store Implementation Integration Tests (#16) * test: Adding integration tests for static utility to create vector embeddings table. * test: Adding add,search,delete integration tests for VectorStore. * test: lint * test: lint * style: lint * style: lint * Empty-Commit to trigger tests * test: addressing review comments. * test: test fix * adding bs4 in test dependencies --------- Co-authored-by: Averi Kitsch <akitsch@google.com> * replacing - with : * style: lint * minor changes. --------- Co-authored-by: Averi Kitsch <akitsch@google.com>
1 parent f9a3b93 commit 9cbae82

File tree

4 files changed

+1814
-1
lines changed

4 files changed

+1814
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Changelog = "https://github.com/googleapis/langchain-google-spanner-python/blob/
2222
[project.optional-dependencies]
2323
test = [
2424
"black[jupyter]==23.12.0",
25+
"bs4==0.0.2",
2526
"isort==5.13.2",
2627
"mypy==1.7.1",
2728
"pytest==7.4.4",

src/langchain_google_spanner/__init__.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,22 @@
1313
# limitations under the License.
1414

1515
from langchain_google_spanner.chat_message_history import SpannerChatMessageHistory
16+
from langchain_google_spanner.vector_store import (
17+
DistanceStrategy,
18+
QueryParameters,
19+
SecondaryIndex,
20+
SpannerVectorStore,
21+
TableColumn,
22+
)
1623

1724
from .version import __version__
1825

19-
__all__ = ["__version__", "SpannerChatMessageHistory"]
26+
__all__ = [
27+
"__version__",
28+
"SpannerChatMessageHistory",
29+
"SpannerVectorStore",
30+
"TableColumn",
31+
"SecondaryIndex",
32+
"QueryParameters",
33+
"DistanceStrategy",
34+
]

0 commit comments

Comments
 (0)