Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

Commit 7b3d0b0

Browse files
committed
docs: Update multimodal notebook to use public runtime helpers
1 parent 2e22558 commit 7b3d0b0

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

notebooks/multimodal/multimodal_dataframe.ipynb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
"metadata": {},
135135
"outputs": [],
136136
"source": [
137-
"import bigframes.operations as ops\n",
137+
"import bigframes.bigquery as bbq\n",
138138
"\n",
139139
"def get_runtime_json_str(series, mode=\"R\", with_metadata=False):\n",
140140
" \"\"\"\n",
@@ -148,16 +148,16 @@
148148
" \"\"\"\n",
149149
" # 1. Optionally fetch metadata\n",
150150
" s = (\n",
151-
" series._apply_unary_op(ops.obj_fetch_metadata_op)\n",
151+
" bbq.obj.fetch_metadata(series)\n",
152152
" if with_metadata\n",
153153
" else series\n",
154154
" )\n",
155155
" \n",
156156
" # 2. Retrieve the access URL runtime object\n",
157-
" runtime = s._apply_unary_op(ops.ObjGetAccessUrl(mode=mode))\n",
157+
" runtime = bbq.obj.get_access_url(s, mode=mode)\n",
158158
" \n",
159159
" # 3. Convert the runtime object to a JSON string\n",
160-
" return runtime._apply_unary_op(ops.ToJSONString())"
160+
" return bbq.to_json_string(runtime)"
161161
]
162162
},
163163
{
@@ -1536,7 +1536,6 @@
15361536
],
15371537
"source": [
15381538
"import bigframes.bigquery as bbq\n",
1539-
"import bigframes.operations as ops\n",
15401539
"\n",
15411540
"# The audio_transcribe function is a convenience wrapper around bigframes.bigquery.ai.generate.\n",
15421541
"# Here's how to perform the same operation directly:\n",
@@ -1551,8 +1550,8 @@
15511550
"\n",
15521551
"# Convert the audio series to the runtime representation required by the model.\n",
15531552
"# This involves fetching metadata and getting a signed access URL.\n",
1554-
"audio_metadata = audio_series._apply_unary_op(ops.obj_fetch_metadata_op)\n",
1555-
"audio_runtime = audio_metadata._apply_unary_op(ops.ObjGetAccessUrl(mode=\"R\"))\n",
1553+
"audio_metadata = bbq.obj.fetch_metadata(audio_series)\n",
1554+
"audio_runtime = bbq.obj.get_access_url(audio_metadata, mode=\"R\")\n",
15561555
"\n",
15571556
"transcribed_results = bbq.ai.generate(\n",
15581557
" prompt=(prompt_text, audio_runtime),\n",

0 commit comments

Comments
 (0)