|
155 | 155 | "execution_count": 4, |
156 | 156 | "metadata": {}, |
157 | 157 | "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 | 158 | { |
183 | 159 | "data": { |
184 | 160 | "text/html": [ |
|
267 | 243 | }, |
268 | 244 | { |
269 | 245 | "cell_type": "code", |
270 | | - "execution_count": 6, |
| 246 | + "execution_count": 5, |
271 | 247 | "metadata": {}, |
272 | 248 | "outputs": [ |
273 | 249 | { |
274 | 250 | "data": { |
275 | 251 | "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 | + " " |
277 | 255 | ], |
278 | 256 | "text/plain": [ |
279 | 257 | "<IPython.core.display.HTML object>" |
|
301 | 279 | " \"content\": message,\n", |
302 | 280 | " }\n", |
303 | 281 | " ],\n", |
304 | | - " model=\"claude-3-5-sonnet@20240620\",\n", |
| 282 | + " model=\"claude-3-haiku@20240307\",\n", |
305 | 283 | " )\n", |
306 | 284 | " content_text = message.content[0].text if message.content else \"\"\n", |
307 | 285 | " return content_text" |
308 | 286 | ] |
309 | 287 | }, |
310 | 288 | { |
311 | 289 | "cell_type": "code", |
312 | | - "execution_count": 7, |
| 290 | + "execution_count": 6, |
313 | 291 | "metadata": {}, |
314 | 292 | "outputs": [ |
315 | 293 | { |
316 | 294 | "data": { |
317 | 295 | "text/plain": [ |
318 | | - "'bigframes-dev._b52b272a35b88e236e1f96fbe3f560c83a8fee85.bigframes_session265649_de1176dd4c57f40ba959503af3981682'" |
| 296 | + "'bigframes-dev._e9a5162ae4daa9f50fda3f95febaa9781131f3b8.bigframes_sessionc10c73_49262141176cbf70037559ae84e834d3'" |
319 | 297 | ] |
320 | 298 | }, |
321 | | - "execution_count": 7, |
| 299 | + "execution_count": 6, |
322 | 300 | "metadata": {}, |
323 | 301 | "output_type": "execute_result" |
324 | 302 | } |
|
330 | 308 | }, |
331 | 309 | { |
332 | 310 | "cell_type": "code", |
333 | | - "execution_count": 8, |
| 311 | + "execution_count": 7, |
334 | 312 | "metadata": {}, |
335 | 313 | "outputs": [ |
336 | 314 | { |
337 | 315 | "data": { |
338 | 316 | "text/plain": [ |
339 | | - "'projects/bigframes-dev/locations/us-east5/functions/bigframes-session265649-de1176dd4c57f40ba959503af3981682'" |
| 317 | + "'projects/bigframes-dev/locations/us-east5/functions/bigframes-sessionc10c73-49262141176cbf70037559ae84e834d3'" |
340 | 318 | ] |
341 | 319 | }, |
342 | | - "execution_count": 8, |
| 320 | + "execution_count": 7, |
343 | 321 | "metadata": {}, |
344 | 322 | "output_type": "execute_result" |
345 | 323 | } |
|
351 | 329 | }, |
352 | 330 | { |
353 | 331 | "cell_type": "code", |
354 | | - "execution_count": 9, |
| 332 | + "execution_count": 8, |
355 | 333 | "metadata": {}, |
356 | 334 | "outputs": [ |
357 | 335 | { |
358 | 336 | "data": { |
359 | 337 | "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<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", |
| 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 | + " " |
397 | 366 | ], |
398 | 367 | "text/plain": [ |
399 | 368 | "<IPython.core.display.HTML object>" |
|
436 | 405 | " <tr>\n", |
437 | 406 | " <th>1</th>\n", |
438 | 407 | " <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", |
440 | 409 | " </tr>\n", |
441 | 410 | " <tr>\n", |
442 | 411 | " <th>2</th>\n", |
443 | 412 | " <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", |
446 | 414 | " </tr>\n", |
447 | 415 | " </tbody>\n", |
448 | 416 | "</table>\n", |
|
457 | 425 | "\n", |
458 | 426 | " answers \n", |
459 | 427 | "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", |
463 | 430 | "\n", |
464 | 431 | "[3 rows x 2 columns]" |
465 | 432 | ] |
466 | 433 | }, |
467 | | - "execution_count": 9, |
| 434 | + "execution_count": 8, |
468 | 435 | "metadata": {}, |
469 | 436 | "output_type": "execute_result" |
470 | 437 | } |
|
484 | 451 | }, |
485 | 452 | { |
486 | 453 | "cell_type": "code", |
487 | | - "execution_count": null, |
| 454 | + "execution_count": 9, |
488 | 455 | "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 | + ], |
490 | 470 | "source": [ |
491 | 471 | "bpd.close_session()" |
492 | 472 | ] |
493 | 473 | } |
494 | 474 | ], |
495 | 475 | "metadata": { |
496 | 476 | "kernelspec": { |
497 | | - "display_name": "venv", |
| 477 | + "display_name": "venv (3.14.2)", |
498 | 478 | "language": "python", |
499 | 479 | "name": "python3" |
500 | 480 | }, |
|
508 | 488 | "name": "python", |
509 | 489 | "nbconvert_exporter": "python", |
510 | 490 | "pygments_lexer": "ipython3", |
511 | | - "version": "3.10.9" |
| 491 | + "version": "3.14.2" |
512 | 492 | } |
513 | 493 | }, |
514 | 494 | "nbformat": 4, |
|
0 commit comments