|
28 | 28 | "</table>" |
29 | 29 | ] |
30 | 30 | }, |
31 | | - { |
32 | | - "cell_type": "code", |
33 | | - "execution_count": null, |
34 | | - "metadata": {}, |
35 | | - "outputs": [], |
36 | | - "source": [ |
37 | | - "import sys\n", |
38 | | - "\n", |
39 | | - "# Python 3.13 is not yet a supported runtime for remote functions.\n", |
40 | | - "# See: https://cloud.google.com/functions/docs/runtime-support#python for the supported runtimes.\n", |
41 | | - "if sys.version_info >= (3, 13, 0):\n", |
42 | | - " sys.exit(0)" |
43 | | - ] |
44 | | - }, |
45 | 31 | { |
46 | 32 | "cell_type": "markdown", |
47 | 33 | "metadata": {}, |
|
155 | 141 | "execution_count": 4, |
156 | 142 | "metadata": {}, |
157 | 143 | "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 | | - }, |
182 | 144 | { |
183 | 145 | "data": { |
184 | 146 | "text/html": [ |
|
267 | 229 | }, |
268 | 230 | { |
269 | 231 | "cell_type": "code", |
270 | | - "execution_count": 6, |
| 232 | + "execution_count": 5, |
271 | 233 | "metadata": {}, |
272 | 234 | "outputs": [ |
273 | 235 | { |
274 | 236 | "data": { |
275 | 237 | "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>" |
| 238 | + "\n", |
| 239 | + " 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", |
| 240 | + " " |
277 | 241 | ], |
278 | 242 | "text/plain": [ |
279 | 243 | "<IPython.core.display.HTML object>" |
|
301 | 265 | " \"content\": message,\n", |
302 | 266 | " }\n", |
303 | 267 | " ],\n", |
304 | | - " model=\"claude-3-5-sonnet@20240620\",\n", |
| 268 | + " model=\"claude-3-haiku@20240307\",\n", |
305 | 269 | " )\n", |
306 | 270 | " content_text = message.content[0].text if message.content else \"\"\n", |
307 | 271 | " return content_text" |
308 | 272 | ] |
309 | 273 | }, |
310 | 274 | { |
311 | 275 | "cell_type": "code", |
312 | | - "execution_count": 7, |
| 276 | + "execution_count": 6, |
313 | 277 | "metadata": {}, |
314 | 278 | "outputs": [ |
315 | 279 | { |
316 | 280 | "data": { |
317 | 281 | "text/plain": [ |
318 | | - "'bigframes-dev._b52b272a35b88e236e1f96fbe3f560c83a8fee85.bigframes_session265649_de1176dd4c57f40ba959503af3981682'" |
| 282 | + "'bigframes-dev._e9a5162ae4daa9f50fda3f95febaa9781131f3b8.bigframes_sessionc10c73_49262141176cbf70037559ae84e834d3'" |
319 | 283 | ] |
320 | 284 | }, |
321 | | - "execution_count": 7, |
| 285 | + "execution_count": 6, |
322 | 286 | "metadata": {}, |
323 | 287 | "output_type": "execute_result" |
324 | 288 | } |
|
330 | 294 | }, |
331 | 295 | { |
332 | 296 | "cell_type": "code", |
333 | | - "execution_count": 8, |
| 297 | + "execution_count": 7, |
334 | 298 | "metadata": {}, |
335 | 299 | "outputs": [ |
336 | 300 | { |
337 | 301 | "data": { |
338 | 302 | "text/plain": [ |
339 | | - "'projects/bigframes-dev/locations/us-east5/functions/bigframes-session265649-de1176dd4c57f40ba959503af3981682'" |
| 303 | + "'projects/bigframes-dev/locations/us-east5/functions/bigframes-sessionc10c73-49262141176cbf70037559ae84e834d3'" |
340 | 304 | ] |
341 | 305 | }, |
342 | | - "execution_count": 8, |
| 306 | + "execution_count": 7, |
343 | 307 | "metadata": {}, |
344 | 308 | "output_type": "execute_result" |
345 | 309 | } |
|
351 | 315 | }, |
352 | 316 | { |
353 | 317 | "cell_type": "code", |
354 | | - "execution_count": 9, |
| 318 | + "execution_count": 8, |
355 | 319 | "metadata": {}, |
356 | 320 | "outputs": [ |
357 | 321 | { |
358 | 322 | "data": { |
359 | 323 | "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>" |
| 324 | + "\n", |
| 325 | + " Query started with request ID bigframes-dev:us-east5.821579f4-63ea-4072-a3ce-318e43768432.<details><summary>SQL</summary><pre>SELECT\n", |
| 326 | + "`bfuid_col_3` AS `bfuid_col_3`,\n", |
| 327 | + "`bfuid_col_4` AS `bfuid_col_4`,\n", |
| 328 | + "`bfuid_col_5` AS `bfuid_col_5`\n", |
| 329 | + "FROM\n", |
| 330 | + "(SELECT\n", |
| 331 | + " `t1`.`bfuid_col_3`,\n", |
| 332 | + " `t1`.`bfuid_col_4`,\n", |
| 333 | + " `t1`.`bfuid_col_5`,\n", |
| 334 | + " `t1`.`bfuid_col_6` AS `bfuid_col_7`\n", |
| 335 | + "FROM (\n", |
| 336 | + " SELECT\n", |
| 337 | + " `t0`.`level_0`,\n", |
| 338 | + " `t0`.`column_0`,\n", |
| 339 | + " `t0`.`bfuid_col_6`,\n", |
| 340 | + " `t0`.`level_0` AS `bfuid_col_3`,\n", |
| 341 | + " `t0`.`column_0` AS `bfuid_col_4`,\n", |
| 342 | + " `bigframes-dev._e9a5162ae4daa9f50fda3f95febaa9781131f3b8.bigframes_sessionc10c73_49262141176cbf70037559ae84e834d3`(`t0`.`column_0`) AS `bfuid_col_5`\n", |
| 343 | + " FROM (\n", |
| 344 | + " SELECT\n", |
| 345 | + " *\n", |
| 346 | + " FROM UNNEST(ARRAY<STRUCT<`level_0` INT64, `column_0` STRING, `bfuid_col_6` INT64>>[STRUCT(0, 'What is the capital of France?', 0), STRUCT(1, 'Explain the concept of photosynthesis in simple terms.', 1), STRUCT(2, 'Write a haiku about artificial intelligence.', 2)]) AS `level_0`\n", |
| 347 | + " ) AS `t0`\n", |
| 348 | + ") AS `t1`)\n", |
| 349 | + "ORDER BY `bfuid_col_7` ASC NULLS LAST\n", |
| 350 | + "LIMIT 10</pre></details>\n", |
| 351 | + " " |
397 | 352 | ], |
398 | 353 | "text/plain": [ |
399 | 354 | "<IPython.core.display.HTML object>" |
|
436 | 391 | " <tr>\n", |
437 | 392 | " <th>1</th>\n", |
438 | 393 | " <td>Explain the concept of photosynthesis in simpl...</td>\n", |
439 | | - " <td>Photosynthesis is the process plants use to ma...</td>\n", |
| 394 | + " <td>Photosynthesis is the process by which plants ...</td>\n", |
440 | 395 | " </tr>\n", |
441 | 396 | " <tr>\n", |
442 | 397 | " <th>2</th>\n", |
443 | 398 | " <td>Write a haiku about artificial intelligence.</td>\n", |
444 | | - " <td>Here's a haiku about artificial intelligence:\n", |
445 | | - "...</td>\n", |
| 399 | + " <td>Here is a haiku about artificial intelligence:...</td>\n", |
446 | 400 | " </tr>\n", |
447 | 401 | " </tbody>\n", |
448 | 402 | "</table>\n", |
|
457 | 411 | "\n", |
458 | 412 | " answers \n", |
459 | 413 | "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", |
| 414 | + "1 Photosynthesis is the process by which plants ... \n", |
| 415 | + "2 Here is a haiku about artificial intelligence:... \n", |
463 | 416 | "\n", |
464 | 417 | "[3 rows x 2 columns]" |
465 | 418 | ] |
466 | 419 | }, |
467 | | - "execution_count": 9, |
| 420 | + "execution_count": 8, |
468 | 421 | "metadata": {}, |
469 | 422 | "output_type": "execute_result" |
470 | 423 | } |
|
484 | 437 | }, |
485 | 438 | { |
486 | 439 | "cell_type": "code", |
487 | | - "execution_count": null, |
| 440 | + "execution_count": 9, |
488 | 441 | "metadata": {}, |
489 | | - "outputs": [], |
| 442 | + "outputs": [ |
| 443 | + { |
| 444 | + "data": { |
| 445 | + "text/html": [ |
| 446 | + "Session sessionc10c73 closed." |
| 447 | + ], |
| 448 | + "text/plain": [ |
| 449 | + "<IPython.core.display.HTML object>" |
| 450 | + ] |
| 451 | + }, |
| 452 | + "metadata": {}, |
| 453 | + "output_type": "display_data" |
| 454 | + } |
| 455 | + ], |
490 | 456 | "source": [ |
491 | 457 | "bpd.close_session()" |
492 | 458 | ] |
493 | 459 | } |
494 | 460 | ], |
495 | 461 | "metadata": { |
496 | 462 | "kernelspec": { |
497 | | - "display_name": "venv", |
| 463 | + "display_name": "venv (3.14.2)", |
498 | 464 | "language": "python", |
499 | 465 | "name": "python3" |
500 | 466 | }, |
|
508 | 474 | "name": "python", |
509 | 475 | "nbconvert_exporter": "python", |
510 | 476 | "pygments_lexer": "ipython3", |
511 | | - "version": "3.10.9" |
| 477 | + "version": "3.14.2" |
512 | 478 | } |
513 | 479 | }, |
514 | 480 | "nbformat": 4, |
|
0 commit comments