chore(docs): Update vector store notebook#96
Merged
averikitsch merged 12 commits intogoogleapis:mainfrom Oct 4, 2024
vmanghnani:patch-1
Merged
chore(docs): Update vector store notebook#96averikitsch merged 12 commits intogoogleapis:mainfrom vmanghnani:patch-1
averikitsch merged 12 commits intogoogleapis:mainfrom
vmanghnani:patch-1
Conversation
1. Added Installation of additional dependencies "langchain-google-vertexai" it is needed for text embedding generation. 2. Set "GOOGLE_CLOUD_PROJECT" env variable for PROJECT_ID, it is needed for table creation / SQL execution in vector_store module. 3. Specified "id_column" value as "row_id", to match it with table creation in "init_vector_store_table" function, if "id_column" is not set then default value is "langchain_id"
averikitsch
reviewed
Oct 1, 2024
| " database_id=DATABASE,\n", | ||
| " table_name=TABLE_NAME,\n", | ||
| " ignore_metadata_columns=[],\n", | ||
| " id_column=\"row_id\",\n", |
Collaborator
There was a problem hiding this comment.
We could similarity update this section to call out the customization:
db = SpannerVectorStore(
instance_id=INSTANCE,
database_id=DATABASE,
table_name=TABLE_NAME,
embedding_service=embeddings,
# Connect to a custom vector store table
# id_column="row_id",
# content_column="content_column",
# metadata_columns=["metadata", "title"]
# metadata_json_column="my-json-metadata",
)Co-authored-by: Averi Kitsch <akitsch@google.com>
vmanghnani
commented
Oct 2, 2024
Contributor
Author
vmanghnani
left a comment
There was a problem hiding this comment.
Updated code based on few suggestions
vmanghnani
commented
Oct 2, 2024
Contributor
Author
vmanghnani
left a comment
There was a problem hiding this comment.
#98 is submitted to make "metadata_columns" option parameter. For now, update code to make it fully functional in colab env
averikitsch
approved these changes
Oct 4, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added Installation of additional dependencies "langchain-google-vertexai" it is needed for text embedding generation.
Set "GOOGLE_CLOUD_PROJECT" env variable for PROJECT_ID, it is needed for table creation / SQL execution in vector_store module.
Specified "id_column" value as "row_id", to match it with table creation in "init_vector_store_table" function, if "id_column" is not set then default value is "langchain_id"