docs: updated tutorials for Image generation and Vector Search (#21000)

Description: docs: updated tutorials for Image generation and Vector
Search

@lkuligin for review

---------

Co-authored-by: adityarane@google.com <adityarane@google.com>
This commit is contained in:
Aditya 2024-04-29 18:34:11 +05:30 committed by GitHub
parent 17bbb7d2a5
commit 07ce39bfe7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 406 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -187,6 +187,28 @@
"## Create Vector Store from texts" "## Create Vector Store from texts"
] ]
}, },
{
"cell_type": "markdown",
"id": "4d98d379",
"metadata": {},
"source": [
"NOTE : If you have existing Index and Endpoints, you can load them using below code"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "066c0f63",
"metadata": {},
"outputs": [],
"source": [
"# TODO : replace 1234567890123456789 with your acutial index ID\n",
"my_index = aiplatform.MatchingEngineIndex(\"1234567890123456789\")\n",
"\n",
"# TODO : replace 1234567890123456789 with your acutial endpoint ID\n",
"my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(\"1234567890123456789\")"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
@ -679,17 +701,6 @@
"vector_store.add_texts(texts=texts, metadatas=metadatas, is_complete_overwrite=True)" "vector_store.add_texts(texts=texts, metadatas=metadatas, is_complete_overwrite=True)"
] ]
}, },
{
"cell_type": "code",
"execution_count": null,
"id": "711efca3",
"metadata": {},
"outputs": [],
"source": [
"my_index = aiplatform.MatchingEngineIndex(\"5908955807575179264\")\n",
"my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(\"7751631742611488768\")"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
@ -735,7 +746,8 @@
"mimetype": "text/x-python", "mimetype": "text/x-python",
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3" "pygments_lexer": "ipython3",
"version": "3.11.6"
} }
}, },
"nbformat": 4, "nbformat": 4,