mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-01-10 07:58:12 -05:00
fix: added google_ml_integration extension to use alloydb ai-nl support api (#1445)
Including the google_ml_integration extension made the add_template function work because it enabled the AI Query Engine features within the Cloud SQL for PostgreSQL database. http://github.com/googleapis/genai-toolbox/blob/test-genai/docs/en/samples/alloydb/ai-nl/alloydb_ai_nl.ipynb --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Manu Paliwal <paliwalmanu99@gmail.com> Co-authored-by: Pete Hampton <pjhampton@protonmail.com> Co-authored-by: Pete Hampton <pjhampton@users.noreply.github.com> Co-authored-by: Averi Kitsch <akitsch@google.com> Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> Co-authored-by: Sri Varshitha <96117854+Myst9@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> Co-authored-by: Twisha Bansal <58483338+twishabansal@users.noreply.github.com> Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: prernakakkar-google <158031829+prernakakkar-google@users.noreply.github.com> Co-authored-by: Huan Chen <142538604+Genesis929@users.noreply.github.com> Co-authored-by: Ajaykumar Yadav <akryadav@google.com> Co-authored-by: trehanshakuntG <trehanshakunt@google.com> Co-authored-by: Dr. Strangelove <drstrangelove@google.com> Co-authored-by: nester-neo4j <nester.marchenko@neo4j.com> Co-authored-by: Haoming Chen <hmchen@google.com> Co-authored-by: isaurabhuttam <118341467+isaurabhuttam@users.noreply.github.com> Co-authored-by: Harsh Jha <83023263+rapid-killer-9@users.noreply.github.com> Co-authored-by: shuzhou-gc <zhoushu@google.com> Co-authored-by: Divyansh <dvbelieve.nitk@gmail.com> Co-authored-by: Jo Alex <17249308+johanesalxd@users.noreply.github.com> Co-authored-by: Anmol Shukla <shuklaanmol@google.com> Co-authored-by: dishaprakash <57954147+dishaprakash@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Harsh Jha <harshrjha@google.com> Co-authored-by: Pranava B <pranava018@gmail.com> Co-authored-by: duwenxin <duwenxin@google.com> Co-authored-by: Anubhav Dhawan <anubhavdhawan@google.com>
This commit is contained in:
@@ -297,7 +297,8 @@
|
||||
"setup_queries = [\n",
|
||||
" # Install required extension to use the AlloyDB AI natural language support API\n",
|
||||
" \"\"\"CREATE EXTENSION IF NOT EXISTS alloydb_ai_nl cascade;\"\"\",\n",
|
||||
"\n",
|
||||
" \"\"\"CREATE EXTENSION IF NOT EXISTS google_ml_integration; \"\"\",\n",
|
||||
" \n",
|
||||
" # Create schema\n",
|
||||
" \"\"\"CREATE SCHEMA IF NOT EXISTS nla_demo;\"\"\",\n",
|
||||
"\n",
|
||||
@@ -689,15 +690,18 @@
|
||||
"source": [
|
||||
"async def run_queries(pool):\n",
|
||||
" async with pool.connect() as db_conn:\n",
|
||||
"\n",
|
||||
" # Verify the generated context for the tables\n",
|
||||
" for query in verify_context_queries:\n",
|
||||
" response = await db_conn.execute(sqlalchemy.text(query))\n",
|
||||
" print(\"Verify the context:\", response.mappings().all())\n",
|
||||
"\n",
|
||||
" \n",
|
||||
" # Update context that needs revision\n",
|
||||
" for query in update_context_queries:\n",
|
||||
" await db_conn.execute(sqlalchemy.text(query))\n",
|
||||
"\n",
|
||||
" \n",
|
||||
" # The resulting context entries in the alloydb_ai_nl.generated_schema_context_view \n",
|
||||
" # view are applied to the corresponding schema objects, and the comments are overwritten.\n",
|
||||
" for query in apply_generated_context_queries:\n",
|
||||
|
||||
Reference in New Issue
Block a user