feat: add bigframes.bigquery.ai.generate_embedding#2343
Conversation
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.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
…pl-11924477578091076513
bigframes.bigquery.ai.generate_embedding
|
|
||
|
|
||
| @log_adapter.method_logger(custom_base_name="bigquery_ai") | ||
| def generate_embedding( |
There was a problem hiding this comment.
Does it make sense to expose this function as bbq.ai.generate_embedding too?
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 "started." 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>
Implement AI.GENERATE_EMBEDDING function in bigframes.bigquery.ai.
PR created automatically by Jules for task 11924477578091076513 started by @tswast