-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add vectorstore docs #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@averikitsch I'm working on docs for MySQL and MSSQL so just leaving some drive by comments 😄
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
docs/vector_store.ipynb
Outdated
}, | ||
"source": [ | ||
"### 🦜🔗 Library Installation\n", | ||
"The integration lives in its own `langchain-google-cloud-sql-pg` package, so we need to install it." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe call out that we are pip installing vertex ai for emebddings as well since you are calling this out and the next line installs two things
docs/vector_store.ipynb
Outdated
"source": [ | ||
"from langchain_google_cloud_sql_pg import PostgreSQLEngine\n", | ||
"\n", | ||
"engine.run_as_sync( # Use run_as_sync() method to run without async/await\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe move the comment "# Use run_as_sync() method to run without async/await" to the comment section above? and maybe explain why they might want to use this option
"outputs": [], | ||
"source": [ | ||
"from langchain_google_vertexai import VertexAIEmbeddings\n", | ||
"\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a text block above saying, here we choose the textembedding-gecko model, and choose the latest version. nit we should fix a version and not recommend latest.
docs/vector_store.ipynb
Outdated
"source": [ | ||
"from langchain_google_cloud_sql_pg import CloudSQLVectorStore\n", | ||
"\n", | ||
"store = CloudSQLVectorStore.create_sync(\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is create_sync always required?
"\n", | ||
"all_texts = [\"Apples and oranges\", \"Cars and airplanes\", \"Pineapple\", \"Train\", \"Banana\"]\n", | ||
"metadatas = [{\"len\": len(t)} for t in all_texts]\n", | ||
"ids = [str(uuid.uuid4()) for _ in all_texts]\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we made it so the user has to add a id and we dont do it for them right? maybe we could a comment saying that, so that they know id will be a means they have to refer to the texts
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from langchain_google_cloud_sql_pg.indexes import IVFFlatIndex\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a text block, "you can create an index to speed up vector search querires. read more about indexes here"
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕