Skip to content

Commit dbc477a

Browse files
rahulpinto19dolphin1999pjhamptonaverikitschduwenxin99
authored
fix: added google_ml_integration extension to use alloydb ai-nl support api (googleapis#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>
1 parent 918753d commit dbc477a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

docs/en/samples/alloydb/ai-nl/alloydb_ai_nl.ipynb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@
297297
"setup_queries = [\n",
298298
" # Install required extension to use the AlloyDB AI natural language support API\n",
299299
" \"\"\"CREATE EXTENSION IF NOT EXISTS alloydb_ai_nl cascade;\"\"\",\n",
300-
"\n",
300+
" \"\"\"CREATE EXTENSION IF NOT EXISTS google_ml_integration; \"\"\",\n",
301+
" \n",
301302
" # Create schema\n",
302303
" \"\"\"CREATE SCHEMA IF NOT EXISTS nla_demo;\"\"\",\n",
303304
"\n",
@@ -689,15 +690,18 @@
689690
"source": [
690691
"async def run_queries(pool):\n",
691692
" async with pool.connect() as db_conn:\n",
693+
"\n",
692694
" # Verify the generated context for the tables\n",
693695
" for query in verify_context_queries:\n",
694696
" response = await db_conn.execute(sqlalchemy.text(query))\n",
695697
" print(\"Verify the context:\", response.mappings().all())\n",
696698
"\n",
699+
" \n",
697700
" # Update context that needs revision\n",
698701
" for query in update_context_queries:\n",
699702
" await db_conn.execute(sqlalchemy.text(query))\n",
700703
"\n",
704+
" \n",
701705
" # The resulting context entries in the alloydb_ai_nl.generated_schema_context_view \n",
702706
" # view are applied to the corresponding schema objects, and the comments are overwritten.\n",
703707
" for query in apply_generated_context_queries:\n",

0 commit comments

Comments
 (0)