feat: add `bigframes.bigquery.ai.generate_embedding` by google-labs-jules[bot] · Pull Request #2343 · googleapis/python-bigquery-dataframes · GitHub
Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

feat: add bigframes.bigquery.ai.generate_embedding#2343

Merged
sycai merged 13 commits intomainfrom
generate-embedding-impl-11924477578091076513
Feb 4, 2026
Merged

feat: add bigframes.bigquery.ai.generate_embedding#2343
sycai merged 13 commits intomainfrom
generate-embedding-impl-11924477578091076513

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

Implement AI.GENERATE_EMBEDDING function in bigframes.bigquery.ai.


PR created automatically by Jules for task 11924477578091076513 started by @tswast

This change implements the `bigframes.bigquery.ai.generate_embedding` function, which wraps the BigQuery `AI.GENERATE_EMBEDDING` TVF.

It supports:
- Generating embeddings from DataFrames and Series.
- Generating embeddings from pandas DataFrames and Series.
- Specifying model name and arguments like `output_dimensionality`, `start_second`, `end_second`, and `interval_seconds`.

The function is exposed in `bigframes.bigquery.ai`.

Unit tests have been added to verify the generated SQL and argument mapping.
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Dec 18, 2025
@product-auto-label product-auto-label Bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Jan 16, 2026
@tswast tswast changed the title Implement AI.GENERATE_EMBEDDING feat: add bigframes.bigquery.ai.generate_embedding Feb 3, 2026
@tswast tswast marked this pull request as ready for review February 3, 2026 17:31
@tswast tswast requested review from a team and sycai February 3, 2026 17:31
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to expose this function as bbq.ai.generate_embedding too?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Done.

@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 3, 2026
@bigframes-bot bigframes-bot removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 3, 2026
@tswast tswast enabled auto-merge (squash) February 3, 2026 19:02
@tswast tswast disabled auto-merge February 3, 2026 19:06
@sycai sycai enabled auto-merge (squash) February 4, 2026 19:42
@sycai sycai added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 4, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 4, 2026
@sycai sycai merged commit e91536c into main Feb 4, 2026
21 of 25 checks passed
@sycai sycai deleted the generate-embedding-impl-11924477578091076513 branch February 4, 2026 20:22
shuoweil added a commit that referenced this pull request Feb 7, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.7.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:e7cc6823efb073a8a26e7cefdd869f12ec228abfbd2a44aa9a7eacc284023677
<details><summary>bigframes: 2.35.0</summary>

##
[2.35.0](v2.34.0...v2.35.0)
(2026-02-07)

### Features

* Add bigframes.pandas.col with basic operators (#2405)
([1274167](12741677))

* remove redundant &#34;started.&#34; messages from progress output
(#2440)
([2017cc2](2017cc2f))

* add bigframe.bigquery.load_data function (#2426)
([4b0f13b](4b0f13b2))

* Disable progress bars in Anywidget mode (#2444)
([4e2689a](4e2689a1))

* add bigquery.ai.generate_text function (#2433)
([5bd0029](5bd0029a))

* Disable progress bars in Anywidget mode to reduce notebook clutter
(#2437)
([853240d](853240da))

* Add a bigframes cell magic for ipython (#2395)
([e6de52d](e6de52de))

* add `bigframes.bigquery.ai.generate_embedding` (#2343)
([e91536c](e91536c8))

### Bug Fixes

* always display the results in the `%%bqsql` cell magics output (#2439)
([2d973b5](2d973b54))

* exlcude gcsfs 2026.2.0 (#2445)
([311de31](311de31e))

* suppress JSONDtypeWarning in Anywidget mode and clean up progress
output (#2441)
([e0d185a](e0d185ad))

### Documentation

* fix cast method shown on public docs (#2436)
([ad0f33c](ad0f33c6))

</details>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants