SpannerVectorStore.init_vector_store_table(
Environment details
Steps to reproduce
-
Run : colab: https://colab.sandbox.google.com/github/googleapis/langchain-google-spanner-python/blob/main/docs/vector_store.ipynb
-
In "SpannerVectorStore.init_vector_store_table" code cell, commentout "metadata_columns" parameter..
cell's execution fails with below error: "...TypeError: 'NoneType' object is not iterable.."
Desired behavior: "metadata_columns" should be optional..
Code example
# example
------------------------------------------------------------------------------------------------------------------------------
from langchain_google_spanner import SecondaryIndex, SpannerVectorStore, TableColumn
SpannerVectorStore.init_vector_store_table(
instance_id=INSTANCE,
database_id=DATABASE,
table_name=TABLE_NAME,
# Customize the table creation
id_column="row_id",
#metadata_columns=[
# TableColumn(name="metadata", type="JSON", is_null=True),
# TableColumn(name="title", type="STRING(MAX)", is_null=False),
#],
secondary_indexes=[
SecondaryIndex(index_name="row_id_and_title", columns=["row_id", "title"])
],
)------------------------------------------------------------------------------------------------------------------------------
SpannerVectorStore.init_vector_store_table(
Environment details
Steps to reproduce
In "SpannerVectorStore.init_vector_store_table" code cell, commentout "metadata_columns" parameter..
cell's execution fails with below error: "...TypeError: 'NoneType' object is not iterable.."
Code example