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

Commit 023ad4b

Browse files
committed
update notebook too
1 parent 20d8a52 commit 023ad4b

1 file changed

Lines changed: 62 additions & 82 deletions

File tree

notebooks/remote_functions/remote_function_vertex_claude_model.ipynb

Lines changed: 62 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -155,30 +155,6 @@
155155
"execution_count": 4,
156156
"metadata": {},
157157
"outputs": [
158-
{
159-
"data": {
160-
"text/html": [
161-
"Query job c4c27713-51c8-4293-8454-5c904df79318 is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:us-east5:c4c27713-51c8-4293-8454-5c904df79318&page=queryresults\">Open Job</a>"
162-
],
163-
"text/plain": [
164-
"<IPython.core.display.HTML object>"
165-
]
166-
},
167-
"metadata": {},
168-
"output_type": "display_data"
169-
},
170-
{
171-
"data": {
172-
"text/html": [
173-
"Query job 0b1b71d8-8546-45f2-b403-707161fe4002 is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:us-east5:0b1b71d8-8546-45f2-b403-707161fe4002&page=queryresults\">Open Job</a>"
174-
],
175-
"text/plain": [
176-
"<IPython.core.display.HTML object>"
177-
]
178-
},
179-
"metadata": {},
180-
"output_type": "display_data"
181-
},
182158
{
183159
"data": {
184160
"text/html": [
@@ -267,13 +243,15 @@
267243
},
268244
{
269245
"cell_type": "code",
270-
"execution_count": 6,
246+
"execution_count": 5,
271247
"metadata": {},
272248
"outputs": [
273249
{
274250
"data": {
275251
"text/html": [
276-
"Query job 488a116f-44b2-4ff7-9f95-bd36473dab0f is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:us-east5:488a116f-44b2-4ff7-9f95-bd36473dab0f&page=queryresults\">Open Job</a>"
252+
"\n",
253+
" Query processed 0 Bytes in a moment of slot time. [<a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:us-east5:9bc70627-6891-44a4-b7d7-8a28e213cdec&page=queryresults\">Job bigframes-dev:us-east5.9bc70627-6891-44a4-b7d7-8a28e213cdec details</a>]\n",
254+
" "
277255
],
278256
"text/plain": [
279257
"<IPython.core.display.HTML object>"
@@ -301,24 +279,24 @@
301279
" \"content\": message,\n",
302280
" }\n",
303281
" ],\n",
304-
" model=\"claude-3-5-sonnet@20240620\",\n",
282+
" model=\"claude-3-haiku@20240307\",\n",
305283
" )\n",
306284
" content_text = message.content[0].text if message.content else \"\"\n",
307285
" return content_text"
308286
]
309287
},
310288
{
311289
"cell_type": "code",
312-
"execution_count": 7,
290+
"execution_count": 6,
313291
"metadata": {},
314292
"outputs": [
315293
{
316294
"data": {
317295
"text/plain": [
318-
"'bigframes-dev._b52b272a35b88e236e1f96fbe3f560c83a8fee85.bigframes_session265649_de1176dd4c57f40ba959503af3981682'"
296+
"'bigframes-dev._e9a5162ae4daa9f50fda3f95febaa9781131f3b8.bigframes_sessionc10c73_49262141176cbf70037559ae84e834d3'"
319297
]
320298
},
321-
"execution_count": 7,
299+
"execution_count": 6,
322300
"metadata": {},
323301
"output_type": "execute_result"
324302
}
@@ -330,16 +308,16 @@
330308
},
331309
{
332310
"cell_type": "code",
333-
"execution_count": 8,
311+
"execution_count": 7,
334312
"metadata": {},
335313
"outputs": [
336314
{
337315
"data": {
338316
"text/plain": [
339-
"'projects/bigframes-dev/locations/us-east5/functions/bigframes-session265649-de1176dd4c57f40ba959503af3981682'"
317+
"'projects/bigframes-dev/locations/us-east5/functions/bigframes-sessionc10c73-49262141176cbf70037559ae84e834d3'"
340318
]
341319
},
342-
"execution_count": 8,
320+
"execution_count": 7,
343321
"metadata": {},
344322
"output_type": "execute_result"
345323
}
@@ -351,49 +329,40 @@
351329
},
352330
{
353331
"cell_type": "code",
354-
"execution_count": 9,
332+
"execution_count": 8,
355333
"metadata": {},
356334
"outputs": [
357335
{
358336
"data": {
359337
"text/html": [
360-
"Query job 58b230a8-6536-4bac-ab02-dcf574692dd6 is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:us-east5:58b230a8-6536-4bac-ab02-dcf574692dd6&page=queryresults\">Open Job</a>"
361-
],
362-
"text/plain": [
363-
"<IPython.core.display.HTML object>"
364-
]
365-
},
366-
"metadata": {},
367-
"output_type": "display_data"
368-
},
369-
{
370-
"data": {
371-
"text/html": [
372-
"Query job 46d6a1e9-426a-4615-8eb5-98d34d08ec07 is DONE. 1.3 kB processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:us-east5:46d6a1e9-426a-4615-8eb5-98d34d08ec07&page=queryresults\">Open Job</a>"
373-
],
374-
"text/plain": [
375-
"<IPython.core.display.HTML object>"
376-
]
377-
},
378-
"metadata": {},
379-
"output_type": "display_data"
380-
},
381-
{
382-
"data": {
383-
"text/html": [
384-
"Query job cf8fcbaa-b233-47cd-b4e3-60876b24879f is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:us-east5:cf8fcbaa-b233-47cd-b4e3-60876b24879f&page=queryresults\">Open Job</a>"
385-
],
386-
"text/plain": [
387-
"<IPython.core.display.HTML object>"
388-
]
389-
},
390-
"metadata": {},
391-
"output_type": "display_data"
392-
},
393-
{
394-
"data": {
395-
"text/html": [
396-
"Query job 2620a544-d1df-4b30-bec4-4221e79ddf0f is DONE. 1.4 kB processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:us-east5:2620a544-d1df-4b30-bec4-4221e79ddf0f&page=queryresults\">Open Job</a>"
338+
"\n",
339+
" Query started with request ID bigframes-dev:us-east5.821579f4-63ea-4072-a3ce-318e43768432.<details><summary>SQL</summary><pre>SELECT\n",
340+
"`bfuid_col_3` AS `bfuid_col_3`,\n",
341+
"`bfuid_col_4` AS `bfuid_col_4`,\n",
342+
"`bfuid_col_5` AS `bfuid_col_5`\n",
343+
"FROM\n",
344+
"(SELECT\n",
345+
" `t1`.`bfuid_col_3`,\n",
346+
" `t1`.`bfuid_col_4`,\n",
347+
" `t1`.`bfuid_col_5`,\n",
348+
" `t1`.`bfuid_col_6` AS `bfuid_col_7`\n",
349+
"FROM (\n",
350+
" SELECT\n",
351+
" `t0`.`level_0`,\n",
352+
" `t0`.`column_0`,\n",
353+
" `t0`.`bfuid_col_6`,\n",
354+
" `t0`.`level_0` AS `bfuid_col_3`,\n",
355+
" `t0`.`column_0` AS `bfuid_col_4`,\n",
356+
" `bigframes-dev._e9a5162ae4daa9f50fda3f95febaa9781131f3b8.bigframes_sessionc10c73_49262141176cbf70037559ae84e834d3`(`t0`.`column_0`) AS `bfuid_col_5`\n",
357+
" FROM (\n",
358+
" SELECT\n",
359+
" *\n",
360+
" FROM UNNEST(ARRAY&lt;STRUCT&lt;`level_0` INT64, `column_0` STRING, `bfuid_col_6` INT64&gt;&gt;[STRUCT(0, &#x27;What is the capital of France?&#x27;, 0), STRUCT(1, &#x27;Explain the concept of photosynthesis in simple terms.&#x27;, 1), STRUCT(2, &#x27;Write a haiku about artificial intelligence.&#x27;, 2)]) AS `level_0`\n",
361+
" ) AS `t0`\n",
362+
") AS `t1`)\n",
363+
"ORDER BY `bfuid_col_7` ASC NULLS LAST\n",
364+
"LIMIT 10</pre></details>\n",
365+
" "
397366
],
398367
"text/plain": [
399368
"<IPython.core.display.HTML object>"
@@ -436,13 +405,12 @@
436405
" <tr>\n",
437406
" <th>1</th>\n",
438407
" <td>Explain the concept of photosynthesis in simpl...</td>\n",
439-
" <td>Photosynthesis is the process plants use to ma...</td>\n",
408+
" <td>Photosynthesis is the process by which plants ...</td>\n",
440409
" </tr>\n",
441410
" <tr>\n",
442411
" <th>2</th>\n",
443412
" <td>Write a haiku about artificial intelligence.</td>\n",
444-
" <td>Here's a haiku about artificial intelligence:\n",
445-
"...</td>\n",
413+
" <td>Here is a haiku about artificial intelligence:...</td>\n",
446414
" </tr>\n",
447415
" </tbody>\n",
448416
"</table>\n",
@@ -457,14 +425,13 @@
457425
"\n",
458426
" answers \n",
459427
"0 The capital of France is Paris. \n",
460-
"1 Photosynthesis is the process plants use to ma... \n",
461-
"2 Here's a haiku about artificial intelligence:\n",
462-
"... \n",
428+
"1 Photosynthesis is the process by which plants ... \n",
429+
"2 Here is a haiku about artificial intelligence:... \n",
463430
"\n",
464431
"[3 rows x 2 columns]"
465432
]
466433
},
467-
"execution_count": 9,
434+
"execution_count": 8,
468435
"metadata": {},
469436
"output_type": "execute_result"
470437
}
@@ -484,17 +451,30 @@
484451
},
485452
{
486453
"cell_type": "code",
487-
"execution_count": null,
454+
"execution_count": 9,
488455
"metadata": {},
489-
"outputs": [],
456+
"outputs": [
457+
{
458+
"data": {
459+
"text/html": [
460+
"Session sessionc10c73 closed."
461+
],
462+
"text/plain": [
463+
"<IPython.core.display.HTML object>"
464+
]
465+
},
466+
"metadata": {},
467+
"output_type": "display_data"
468+
}
469+
],
490470
"source": [
491471
"bpd.close_session()"
492472
]
493473
}
494474
],
495475
"metadata": {
496476
"kernelspec": {
497-
"display_name": "venv",
477+
"display_name": "venv (3.14.2)",
498478
"language": "python",
499479
"name": "python3"
500480
},
@@ -508,7 +488,7 @@
508488
"name": "python",
509489
"nbconvert_exporter": "python",
510490
"pygments_lexer": "ipython3",
511-
"version": "3.10.9"
491+
"version": "3.14.2"
512492
}
513493
},
514494
"nbformat": 4,

0 commit comments

Comments
 (0)