Skip to content

Commit

Permalink
feat: Spanner Implementation for Vector Store (#10)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* replacing - with :

* style: lint

* minor changes.

---------

Co-authored-by: Averi Kitsch <[email protected]>
  • Loading branch information
gauravpurohit06 and averikitsch authored Feb 22, 2024
1 parent f9a3b93 commit 9cbae82
Show file tree
Hide file tree
Showing 4 changed files with 1,814 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Changelog = "https://github.com/googleapis/langchain-google-spanner-python/blob/
[project.optional-dependencies]
test = [
"black[jupyter]==23.12.0",
"bs4==0.0.2",
"isort==5.13.2",
"mypy==1.7.1",
"pytest==7.4.4",
Expand Down
17 changes: 16 additions & 1 deletion src/langchain_google_spanner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,22 @@
# limitations under the License.

from langchain_google_spanner.chat_message_history import SpannerChatMessageHistory
from langchain_google_spanner.vector_store import (
DistanceStrategy,
QueryParameters,
SecondaryIndex,
SpannerVectorStore,
TableColumn,
)

from .version import __version__

__all__ = ["__version__", "SpannerChatMessageHistory"]
__all__ = [
"__version__",
"SpannerChatMessageHistory",
"SpannerVectorStore",
"TableColumn",
"SecondaryIndex",
"QueryParameters",
"DistanceStrategy",
]
Loading

0 comments on commit 9cbae82

Please sign in to comment.