-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat!: complete deprecation and cleanup of multimodal blob APIs #16618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8605075
b0e075d
1624846
b9476e6
d84ec94
9c3bc9e
11f0b0b
5a89396
38a7820
e765ef0
8af2532
c73abe7
7575c1e
2ce7667
4eaf89e
8cc3a14
7c92e4f
0a5f0de
0ce4ea7
1ba46c0
0ad7482
167be41
b84baf0
653a1b4
a24ab28
a72a4a5
983ef09
25a9fd5
991691a
ebbedda
2531f43
7bdfcfc
05384ec
46c95ab
5ecdec9
1736391
2bbfe0a
1c2c400
4497308
f108a4c
233ab16
3340a72
c9cf4b7
53a1139
1b5080c
9a9a83f
b219d04
e625cd2
769534f
2f8bfbd
859faea
7830a35
242730e
6a7f0b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,8 @@ | |
|
|
||
| """This module integrates BigQuery built-in AI functions for use with Series/DataFrame objects, | ||
| such as AI.GENERATE_BOOL: | ||
| https://cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-generate-bool""" | ||
| https://cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-generate-bool | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
|
|
@@ -1169,7 +1170,9 @@ def _separate_context_and_series( | |
| if isinstance(prompt, series.Series): | ||
| if prompt.dtype == dtypes.OBJ_REF_DTYPE: | ||
| # Multi-model support | ||
| return [None], [prompt.blob.read_url()] | ||
| import bigframes.bigquery as bbq | ||
|
|
||
| return [None], [bbq.obj.get_access_url(prompt, mode="R")] | ||
| return [None], [prompt] | ||
|
|
||
| prompt_context: List[str | None] = [] | ||
|
|
@@ -1206,7 +1209,9 @@ def _convert_series( | |
|
|
||
| if result.dtype == dtypes.OBJ_REF_DTYPE: | ||
| # Support multimodel | ||
| return result.blob.read_url() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, maybe replace the blob accessor with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. I have also replaced the blob accessor with bbq.obj.get_access_url(result, mode="R") here to maintain support for multimodal columns. |
||
| import bigframes.bigquery as bbq | ||
|
|
||
| return bbq.obj.get_access_url(result, mode="R") | ||
| return result | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of deleting this "if" branch, could you use your
obj.get_access_urlto replace the blob accessor call? We still need get_access_url() for multimodal columns. (See https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-generate-int)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I have restored this branch and replaced prompt.blob.read_url() with bbq.obj.get_access_url(prompt, mode="R") to support multimodal columns as you suggested.