Uh oh!
There was an error while loading. Please reload this page.
feat(bigframes): add ai.embed and ai.similarity to bigquery accessor - #17927
Conversation
There was a problem hiding this comment.
Code Review
This pull request renames AITVFMixin to AIMixin and adds embed and similarity methods to the AIMixin class in series_mixins.py to support BigQuery AI embeddings and similarity calculations, along with corresponding unit tests. The review feedback highlights a shadowing issue in the new methods where the session parameter shadows the imported session module, which would cause failures when session is None. To resolve this, it is recommended to import bigframes at the module level and fall back to bigframes.session when the parameter is not provided.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🤖 I have created a release *beep* *boop* --- ## [2.47.0](bigframes-v2.46.0...bigframes-v2.47.0) (2026-08-03) ### Features * **bigframes:** add ai.embed and ai.similarity to bigquery accessor ([#17927](#17927)) ([2d1372b](2d1372b)) ### Bug Fixes * **bigframes:** fix mypy errors in _magics.py related to get_ipython ([#17979](#17979)) ([24d955e](24d955e)) * bump brace-expansion from 5.0.6 to 5.0.7 in /packages/bigframes/bigframes/display/table_widget_angular ([#17794](#17794)) ([2df1bb5](2df1bb5)) * bump fast-uri from 3.1.1 to 3.1.4 in /packages/bigframes/bigframes/display/table_widget_angular ([#17828](#17828)) ([8ce495a](8ce495a)) * bump hono from 4.12.16 to 4.12.31 in /packages/bigframes/bigframes/display/table_widget_angular ([#17829](#17829)) ([6d6fa39](6d6fa39)) * bump immutable from 5.1.7 to 5.1.9 in /packages/bigframes/bigframes/display/table_widget_angular ([#17830](#17830)) ([6abb1da](6abb1da)) * bump postcss from 8.5.14 to 8.5.23 in /packages/bigframes/bigframes/display/table_widget_angular ([#17908](#17908)) ([e68eb8f](e68eb8f)) * bump tar from 7.5.16 to 7.5.20 in /packages/bigframes/bigframes/display/table_widget_angular ([#17793](#17793)) ([3502d41](3502d41)) * require Protobuf 6.33.5+ ([#17743](#17743)) ([d267342](d267342)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [2.47.0](googleapis/google-cloud-python@bigframes-v2.46.0...bigframes-v2.47.0) (2026-08-03) ### Features * **bigframes:** add ai.embed and ai.similarity to bigquery accessor ([#17927](googleapis/google-cloud-python#17927)) ([2d1372b](googleapis/google-cloud-python@2d1372b)) ### Bug Fixes * **bigframes:** fix mypy errors in _magics.py related to get_ipython ([#17979](googleapis/google-cloud-python#17979)) ([24d955e](googleapis/google-cloud-python@24d955e)) * bump brace-expansion from 5.0.6 to 5.0.7 in /packages/bigframes/bigframes/display/table_widget_angular ([#17794](googleapis/google-cloud-python#17794)) ([2df1bb5](googleapis/google-cloud-python@2df1bb5)) * bump fast-uri from 3.1.1 to 3.1.4 in /packages/bigframes/bigframes/display/table_widget_angular ([#17828](googleapis/google-cloud-python#17828)) ([8ce495a](googleapis/google-cloud-python@8ce495a)) * bump hono from 4.12.16 to 4.12.31 in /packages/bigframes/bigframes/display/table_widget_angular ([#17829](googleapis/google-cloud-python#17829)) ([6d6fa39](googleapis/google-cloud-python@6d6fa39)) * bump immutable from 5.1.7 to 5.1.9 in /packages/bigframes/bigframes/display/table_widget_angular ([#17830](googleapis/google-cloud-python#17830)) ([6abb1da](googleapis/google-cloud-python@6abb1da)) * bump postcss from 8.5.14 to 8.5.23 in /packages/bigframes/bigframes/display/table_widget_angular ([#17908](googleapis/google-cloud-python#17908)) ([e68eb8f](googleapis/google-cloud-python@e68eb8f)) * bump tar from 7.5.16 to 7.5.20 in /packages/bigframes/bigframes/display/table_widget_angular ([#17793](googleapis/google-cloud-python#17793)) ([3502d41](googleapis/google-cloud-python@3502d41)) * require Protobuf 6.33.5+ ([#17743](googleapis/google-cloud-python#17743)) ([d267342](googleapis/google-cloud-python@d267342)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> GitOrigin-RevId: 654a96f867c8b749702027d6c3d39f3864c48081 Change-Id: I942ec3bf4556b4c325f4b0acd3a0759ce4139dc2
I chose to define functions under the mixin instead of the code generator because of several function gaps.
We may onboard the ai functions to the code generator some day in the future. Tracking: b/540011825
Internal issue: b/517233441