Spaces:
Running
Running
File size: 196,266 Bytes
46755e5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: smolagents[litellm] in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (1.10.0)\n",
"Requirement already satisfied: huggingface-hub>=0.28.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (0.29.1)\n",
"Requirement already satisfied: requests>=2.32.3 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (2.32.3)\n",
"Requirement already satisfied: rich>=13.9.4 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (13.9.4)\n",
"Requirement already satisfied: pandas>=2.2.3 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (2.2.3)\n",
"Requirement already satisfied: jinja2>=3.1.4 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (3.1.5)\n",
"Requirement already satisfied: pillow>=11.0.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (11.1.0)\n",
"Requirement already satisfied: markdownify>=0.14.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (1.0.0)\n",
"Requirement already satisfied: duckduckgo-search>=6.3.7 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (7.5.0)\n",
"Requirement already satisfied: python-dotenv in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from smolagents[litellm]) (1.0.1)\n",
"Collecting litellm>=1.60.2 (from smolagents[litellm])\n",
" Downloading litellm-1.63.2-py3-none-any.whl (6.9 MB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.9/6.9 MB\u001b[0m \u001b[31m35.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: click>=8.1.8 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from duckduckgo-search>=6.3.7->smolagents[litellm]) (8.1.8)\n",
"Requirement already satisfied: primp>=0.14.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from duckduckgo-search>=6.3.7->smolagents[litellm]) (0.14.0)\n",
"Requirement already satisfied: lxml>=5.3.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from duckduckgo-search>=6.3.7->smolagents[litellm]) (5.3.1)\n",
"Requirement already satisfied: filelock in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (3.17.0)\n",
"Requirement already satisfied: fsspec>=2023.5.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (2024.9.0)\n",
"Requirement already satisfied: packaging>=20.9 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (24.1)\n",
"Requirement already satisfied: pyyaml>=5.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (6.0.2)\n",
"Requirement already satisfied: tqdm>=4.42.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (4.66.5)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from huggingface-hub>=0.28.0->smolagents[litellm]) (4.12.2)\n",
"Requirement already satisfied: MarkupSafe>=2.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from jinja2>=3.1.4->smolagents[litellm]) (3.0.2)\n",
"Requirement already satisfied: aiohttp in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from litellm>=1.60.2->smolagents[litellm]) (3.10.10)\n",
"Requirement already satisfied: httpx>=0.23.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from litellm>=1.60.2->smolagents[litellm]) (0.27.2)\n",
"Collecting importlib-metadata>=6.8.0 (from litellm>=1.60.2->smolagents[litellm])\n",
" Downloading importlib_metadata-8.6.1-py3-none-any.whl (26 kB)\n",
"Collecting jsonschema<5.0.0,>=4.22.0 (from litellm>=1.60.2->smolagents[litellm])\n",
" Downloading jsonschema-4.23.0-py3-none-any.whl (88 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m88.5/88.5 kB\u001b[0m \u001b[31m29.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hCollecting openai>=1.61.0 (from litellm>=1.60.2->smolagents[litellm])\n",
" Downloading openai-1.65.4-py3-none-any.whl (473 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m473.5/473.5 kB\u001b[0m \u001b[31m70.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: pydantic<3.0.0,>=2.0.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from litellm>=1.60.2->smolagents[litellm]) (2.9.2)\n",
"Requirement already satisfied: tiktoken>=0.7.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from litellm>=1.60.2->smolagents[litellm]) (0.8.0)\n",
"Collecting tokenizers (from litellm>=1.60.2->smolagents[litellm])\n",
" Using cached tokenizers-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)\n",
"Requirement already satisfied: beautifulsoup4<5,>=4.9 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from markdownify>=0.14.1->smolagents[litellm]) (4.12.3)\n",
"Requirement already satisfied: six<2,>=1.15 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from markdownify>=0.14.1->smolagents[litellm]) (1.16.0)\n",
"Requirement already satisfied: numpy>=1.23.2 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pandas>=2.2.3->smolagents[litellm]) (1.26.4)\n",
"Requirement already satisfied: python-dateutil>=2.8.2 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pandas>=2.2.3->smolagents[litellm]) (2.9.0.post0)\n",
"Requirement already satisfied: pytz>=2020.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pandas>=2.2.3->smolagents[litellm]) (2024.2)\n",
"Requirement already satisfied: tzdata>=2022.7 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pandas>=2.2.3->smolagents[litellm]) (2024.2)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from requests>=2.32.3->smolagents[litellm]) (3.4.0)\n",
"Requirement already satisfied: idna<4,>=2.5 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from requests>=2.32.3->smolagents[litellm]) (3.10)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from requests>=2.32.3->smolagents[litellm]) (2.2.3)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from requests>=2.32.3->smolagents[litellm]) (2024.8.30)\n",
"Requirement already satisfied: markdown-it-py>=2.2.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from rich>=13.9.4->smolagents[litellm]) (3.0.0)\n",
"Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from rich>=13.9.4->smolagents[litellm]) (2.18.0)\n",
"Requirement already satisfied: soupsieve>1.2 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from beautifulsoup4<5,>=4.9->markdownify>=0.14.1->smolagents[litellm]) (2.6)\n",
"Requirement already satisfied: anyio in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from httpx>=0.23.0->litellm>=1.60.2->smolagents[litellm]) (4.6.0)\n",
"Requirement already satisfied: httpcore==1.* in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from httpx>=0.23.0->litellm>=1.60.2->smolagents[litellm]) (1.0.6)\n",
"Requirement already satisfied: sniffio in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from httpx>=0.23.0->litellm>=1.60.2->smolagents[litellm]) (1.3.1)\n",
"Requirement already satisfied: h11<0.15,>=0.13 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from httpcore==1.*->httpx>=0.23.0->litellm>=1.60.2->smolagents[litellm]) (0.14.0)\n",
"Collecting zipp>=3.20 (from importlib-metadata>=6.8.0->litellm>=1.60.2->smolagents[litellm])\n",
" Downloading zipp-3.21.0-py3-none-any.whl (9.6 kB)\n",
"Requirement already satisfied: attrs>=22.2.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from jsonschema<5.0.0,>=4.22.0->litellm>=1.60.2->smolagents[litellm]) (24.2.0)\n",
"Collecting jsonschema-specifications>=2023.03.6 (from jsonschema<5.0.0,>=4.22.0->litellm>=1.60.2->smolagents[litellm])\n",
" Downloading jsonschema_specifications-2024.10.1-py3-none-any.whl (18 kB)\n",
"Collecting referencing>=0.28.4 (from jsonschema<5.0.0,>=4.22.0->litellm>=1.60.2->smolagents[litellm])\n",
" Downloading referencing-0.36.2-py3-none-any.whl (26 kB)\n",
"Collecting rpds-py>=0.7.1 (from jsonschema<5.0.0,>=4.22.0->litellm>=1.60.2->smolagents[litellm])\n",
" Downloading rpds_py-0.23.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (386 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m386.3/386.3 kB\u001b[0m \u001b[31m66.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: mdurl~=0.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from markdown-it-py>=2.2.0->rich>=13.9.4->smolagents[litellm]) (0.1.2)\n",
"Requirement already satisfied: distro<2,>=1.7.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from openai>=1.61.0->litellm>=1.60.2->smolagents[litellm]) (1.9.0)\n",
"Requirement already satisfied: jiter<1,>=0.4.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from openai>=1.61.0->litellm>=1.60.2->smolagents[litellm]) (0.6.1)\n",
"Requirement already satisfied: annotated-types>=0.6.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pydantic<3.0.0,>=2.0.0->litellm>=1.60.2->smolagents[litellm]) (0.7.0)\n",
"Requirement already satisfied: pydantic-core==2.23.4 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from pydantic<3.0.0,>=2.0.0->litellm>=1.60.2->smolagents[litellm]) (2.23.4)\n",
"Requirement already satisfied: regex>=2022.1.18 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from tiktoken>=0.7.0->litellm>=1.60.2->smolagents[litellm]) (2024.9.11)\n",
"Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from aiohttp->litellm>=1.60.2->smolagents[litellm]) (2.4.3)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from aiohttp->litellm>=1.60.2->smolagents[litellm]) (1.3.1)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from aiohttp->litellm>=1.60.2->smolagents[litellm]) (1.4.1)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from aiohttp->litellm>=1.60.2->smolagents[litellm]) (6.1.0)\n",
"Requirement already satisfied: yarl<2.0,>=1.12.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from aiohttp->litellm>=1.60.2->smolagents[litellm]) (1.15.0)\n",
"Requirement already satisfied: propcache>=0.2.0 in /home/martin/.pyenv/versions/3.11.4/envs/agents/lib/python3.11/site-packages (from yarl<2.0,>=1.12.0->aiohttp->litellm>=1.60.2->smolagents[litellm]) (0.2.0)\n",
"Installing collected packages: zipp, rpds-py, referencing, importlib-metadata, tokenizers, openai, jsonschema-specifications, jsonschema, litellm\n",
" Attempting uninstall: openai\n",
" Found existing installation: openai 1.51.2\n",
" Uninstalling openai-1.51.2:\n",
" Successfully uninstalled openai-1.51.2\n",
"Successfully installed importlib-metadata-8.6.1 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 litellm-1.63.2 openai-1.65.4 referencing-0.36.2 rpds-py-0.23.1 tokenizers-0.21.0 zipp-3.21.0\n",
"\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.1.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m25.0.1\u001b[0m\n",
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n"
]
}
],
"source": [
"\n",
"!pip install 'smolagents[litellm]'"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "685a5c8515104215a7e1aa805b0985b2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from huggingface_hub import notebook_login\n",
"\n",
"notebook_login()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">╭──────────────────────────────────────────────────── </span><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">New run</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ────────────────────────────────────────────────────╮</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\">Search for the best music recommendations for a party at the Wayne's mansion.</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">╰─ LiteLLMModel - gemini/gemini-2.0-flash-lite-001 ───────────────────────────────────────────────────────────────╯</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m╭─\u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[1;38;2;212;183;2mNew run\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╮\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[1mSearch for the best music recommendations for a party at the Wayne's mansion.\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m╰─\u001b[0m\u001b[38;2;212;183;2m LiteLLMModel - gemini/gemini-2.0-flash-lite-001 \u001b[0m\u001b[38;2;212;183;2m──────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m1\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">party_music_search </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> web_search(query</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"best music for a party\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(party_music_search)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mparty_music_search\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mweb_search\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mquery\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mbest music for a party\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mparty_music_search\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Execution logs:</span>\n",
"## Search Results\n",
"\n",
"[The 75 Best Party Songs That Will Get Everyone Dancing - \n",
"Gear4music](https://www.gear4music.com/blog/best-party-songs/)\n",
"The best party songs 1. \"September\" - Earth, Wind & Fire (1978) Quite possibly the best party song. An infectious \n",
"mix of funk and soul, \"September\" is celebrated for its upbeat melody and \"ba-dee-ya\" chorus, making it a timeless \n",
"dance favorite.\n",
"\n",
"[Best Songs To Party: DJ's Ultimate Party Songs Playlist - \n",
"Top40Weekly.com](https://top40weekly.com/best-songs-to-party/)\n",
"Best Songs To Party: DJ's Ultimate Party Songs Playlist. If you're looking for the ultimate playlist to get your \n",
"party started, look no further than this best party songs playlist. Whether you're hosting a birthday bash, a \n",
"backyard barbecue, or just a night in with friends, the right music can make all the difference. From classic hits \n",
"to ...\n",
"\n",
"[45 Songs That Get Your Event Guests on the Dance Floor Every \n",
"Time](https://hub.theeventplannerexpo.com/entertainment/35-songs-that-get-your-event-guests-on-the-dance-floor-ever\n",
"y-time)\n",
"You'll know your client's event best, including music genre preferences and styles. But these songs are wildly \n",
"popular among many generations and are always great to have on standby should your dance guests need a boost. Party\n",
"Songs \"Flowers\" by Miley Cyrus (2023) \"TQG\" by KAROL G & Shakira (2023) \"TRUSTFALL\" by P!nk (2023)\n",
"\n",
"[40 Best Party Songs | Songs To Dance To, Ranked By Our Editors - Time \n",
"Out](https://www.timeout.com/music/best-party-songs)\n",
"The best is when you go for the extended version, and find yourself in the midst of the intro for about 11 minutes.\n",
"But whichever version you go for, this is the party song, in every way. She ...\n",
"\n",
"[The Top 100 Best Party Songs of All Time - \n",
"LiveAbout](https://www.liveabout.com/top-best-party-songs-of-all-time-3248355)\n",
"\"Macarena\" then spent 14 weeks at No. 1 on the U.S. pop singles chart. For more than a year this was one of the \n",
"most popular special event songs in the United States. It still works well as a charming party song encouraging \n",
"everyone to join in on the simple dance.\n",
"\n",
"[50+ Best Songs For Your Next Party in 2025 - Aleka's \n",
"Get-Together](https://alekasgettogether.com/top-songs-for-any-party/)\n",
"Whether you're planning a How To Host The Best Party At Home or just want to liven up your playlist, we've got you \n",
"covered with 100 crowd-pleasing tunes. From timeless classics to modern hits, these songs are guaranteed to keep \n",
"the energy high and the good times rolling all night long. 50 Popular Party Songs. Uptown Funk - Mark Ronson ft ...\n",
"\n",
"[The 101 Best Party Songs Of All Time - Music Grotto](https://www.musicgrotto.com/best-party-songs/)\n",
"A pounding beat and dramatic vocals make this song one of the best party songs to come out of Europe, and the \n",
"song's music video features a strange and compelling premise of a dead man being reanimated and falling in love \n",
"with a woman. Tjis Verwest, (a.k.a. Tiësto) composed the song with help from James Bell, Julia Karlsson, and Anton \n",
"Rundberg.\n",
"\n",
"[Top 200 Most Requested Songs - DJ Event Planner](https://djeventplanner.com/mostrequested.htm)\n",
"Based on over 2 million requests using the DJ Event Planner song request system, this is a list of the most \n",
"requested songs of the past year. Sign Up For A Free Trial Click To Hide Me Top 200 Decades Special Songs Print \n",
"Download PDF UK Edition Last Year's List Sign Up For A Free Trial\n",
"\n",
"[20 Best Celebration Songs for Your Party Playlist - The Knot](https://www.theknot.com/content/celebration-songs)\n",
"Celebrate good times with the best celebration songs, perfect for bringing everyone to the dance floor to \n",
"scream-sing your favorite celebratory lyrics. Earn cash as you plan. Get a $20 gift card for every 200 points. ... \n",
"Few celebration party songs hold a candle to this one by Rare Earth, which has been a must-have addition to any \n",
"wedding song ...\n",
"\n",
"[100 Best Party Songs: The Ultimate Party Playlist](https://audiocaptain.com/best-party-songs/)\n",
"Best 2000s Party Songs. Stylistically speaking, music that dominated the charts in the 2000s was nondescript.. \n",
"There was not much new regarding musical directions. Club and hip hop dominated the charts while indie acts and \n",
"some rock groups still had influence.\n",
"\n",
"Out: None\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1mExecution logs:\u001b[0m\n",
"## Search Results\n",
"\n",
"[The 75 Best Party Songs That Will Get Everyone Dancing - \n",
"Gear4music](https://www.gear4music.com/blog/best-party-songs/)\n",
"The best party songs 1. \"September\" - Earth, Wind & Fire (1978) Quite possibly the best party song. An infectious \n",
"mix of funk and soul, \"September\" is celebrated for its upbeat melody and \"ba-dee-ya\" chorus, making it a timeless \n",
"dance favorite.\n",
"\n",
"[Best Songs To Party: DJ's Ultimate Party Songs Playlist - \n",
"Top40Weekly.com](https://top40weekly.com/best-songs-to-party/)\n",
"Best Songs To Party: DJ's Ultimate Party Songs Playlist. If you're looking for the ultimate playlist to get your \n",
"party started, look no further than this best party songs playlist. Whether you're hosting a birthday bash, a \n",
"backyard barbecue, or just a night in with friends, the right music can make all the difference. From classic hits \n",
"to ...\n",
"\n",
"[45 Songs That Get Your Event Guests on the Dance Floor Every \n",
"Time](https://hub.theeventplannerexpo.com/entertainment/35-songs-that-get-your-event-guests-on-the-dance-floor-ever\n",
"y-time)\n",
"You'll know your client's event best, including music genre preferences and styles. But these songs are wildly \n",
"popular among many generations and are always great to have on standby should your dance guests need a boost. Party\n",
"Songs \"Flowers\" by Miley Cyrus (2023) \"TQG\" by KAROL G & Shakira (2023) \"TRUSTFALL\" by P!nk (2023)\n",
"\n",
"[40 Best Party Songs | Songs To Dance To, Ranked By Our Editors - Time \n",
"Out](https://www.timeout.com/music/best-party-songs)\n",
"The best is when you go for the extended version, and find yourself in the midst of the intro for about 11 minutes.\n",
"But whichever version you go for, this is the party song, in every way. She ...\n",
"\n",
"[The Top 100 Best Party Songs of All Time - \n",
"LiveAbout](https://www.liveabout.com/top-best-party-songs-of-all-time-3248355)\n",
"\"Macarena\" then spent 14 weeks at No. 1 on the U.S. pop singles chart. For more than a year this was one of the \n",
"most popular special event songs in the United States. It still works well as a charming party song encouraging \n",
"everyone to join in on the simple dance.\n",
"\n",
"[50+ Best Songs For Your Next Party in 2025 - Aleka's \n",
"Get-Together](https://alekasgettogether.com/top-songs-for-any-party/)\n",
"Whether you're planning a How To Host The Best Party At Home or just want to liven up your playlist, we've got you \n",
"covered with 100 crowd-pleasing tunes. From timeless classics to modern hits, these songs are guaranteed to keep \n",
"the energy high and the good times rolling all night long. 50 Popular Party Songs. Uptown Funk - Mark Ronson ft ...\n",
"\n",
"[The 101 Best Party Songs Of All Time - Music Grotto](https://www.musicgrotto.com/best-party-songs/)\n",
"A pounding beat and dramatic vocals make this song one of the best party songs to come out of Europe, and the \n",
"song's music video features a strange and compelling premise of a dead man being reanimated and falling in love \n",
"with a woman. Tjis Verwest, (a.k.a. Tiësto) composed the song with help from James Bell, Julia Karlsson, and Anton \n",
"Rundberg.\n",
"\n",
"[Top 200 Most Requested Songs - DJ Event Planner](https://djeventplanner.com/mostrequested.htm)\n",
"Based on over 2 million requests using the DJ Event Planner song request system, this is a list of the most \n",
"requested songs of the past year. Sign Up For A Free Trial Click To Hide Me Top 200 Decades Special Songs Print \n",
"Download PDF UK Edition Last Year's List Sign Up For A Free Trial\n",
"\n",
"[20 Best Celebration Songs for Your Party Playlist - The Knot](https://www.theknot.com/content/celebration-songs)\n",
"Celebrate good times with the best celebration songs, perfect for bringing everyone to the dance floor to \n",
"scream-sing your favorite celebratory lyrics. Earn cash as you plan. Get a $20 gift card for every 200 points. ... \n",
"Few celebration party songs hold a candle to this one by Rare Earth, which has been a must-have addition to any \n",
"wedding song ...\n",
"\n",
"[100 Best Party Songs: The Ultimate Party Playlist](https://audiocaptain.com/best-party-songs/)\n",
"Best 2000s Party Songs. Stylistically speaking, music that dominated the charts in the 2000s was nondescript.. \n",
"There was not much new regarding musical directions. Club and hip hop dominated the charts while indie acts and \n",
"some rock groups still had influence.\n",
"\n",
"Out: None\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 1: Duration 9.02 seconds| Input tokens: 2,249 | Output tokens: 82]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 1: Duration 9.02 seconds| Input tokens: 2,249 | Output tokens: 82]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m2\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">wayne_mansion_music </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> web_search(query</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"best music for a party Wayne's mansion\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(wayne_mansion_music)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mwayne_mansion_music\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mweb_search\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mquery\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mbest music for a party Wayne\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m'\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34ms mansion\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mwayne_mansion_music\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Execution logs:</span>\n",
"## Search Results\n",
"\n",
"[The 75 Best Party Songs That Will Get Everyone Dancing - \n",
"Gear4music](https://www.gear4music.com/blog/best-party-songs/)\n",
"The best party songs 1. \"September\" - Earth, Wind & Fire (1978) Quite possibly the best party song. An infectious \n",
"mix of funk and soul, \"September\" is celebrated for its upbeat melody and \"ba-dee-ya\" chorus, making it a timeless \n",
"dance favorite.\n",
"\n",
"[45 Songs That Get Your Event Guests on the Dance Floor Every \n",
"Time](https://hub.theeventplannerexpo.com/entertainment/35-songs-that-get-your-event-guests-on-the-dance-floor-ever\n",
"y-time)\n",
"You'll know your client's event best, including music genre preferences and styles. But these songs are wildly \n",
"popular among many generations and are always great to have on standby should your dance guests need a boost. Party\n",
"Songs \"Flowers\" by Miley Cyrus (2023) \"TQG\" by KAROL G & Shakira (2023) \"TRUSTFALL\" by P!nk (2023)\n",
"\n",
"[50 Songs on Every Event Planner's Playlist - \n",
"Eventbrite](https://www.eventbrite.com/blog/event-planning-playlist-ds00/)\n",
"Music sets the mood and provides the soundtrack (literally) for a memorable and exciting time. While the right \n",
"songs can enhance the experience, the wrong event music can throw off the vibe. For example, fast-paced songs \n",
"probably aren't the best fit for a formal gala. And smooth jazz is likely to lull your guests at a motivational \n",
"conference.\n",
"\n",
"[Wedding Party Entrance Songs to Get the Party Started - The Mansion \n",
"...](https://mansiononmainstreet.com/wedding-party-entrance-songs-to-get-the-party-started/)\n",
"Best Wedding Party Entrance Songs. No matter what vibe you're going for, there are some wedding party entrance \n",
"songs that are guaranteed to be a hit with people. ... \"Down,\" by Jay Sean ft. Lil Wayne ... The Mansion on Main \n",
"Street is a picturesque events venue wrapped in elegance and modern beauty. Situated amidst exquisitely manicured \n",
"...\n",
"\n",
"[27 Most Influential Songs About Parties & Celebrations (Must Hear)](https://www.pdmusic.org/songs-about-parties/)\n",
"Contents. 1 27 Most Famous Songs About Parties, Partying & Drinking With Friend (Ultimate Playlist); 2 #1 \"Party in\n",
"the U.S.A.\" by Miley Cyrus; 3 #2 \"I Gotta Feeling\" by The Black Eyed Peas; 4 #3 \"Party Rock Anthem\" by LMFAO; 5 #4 \n",
"\"Last Friday Night (T.G.I.F.)\" by Katy Perry; 6 #5 \"Dancing Queen\" by ABBA; 7 #6 \"Turn Down for What\" by DJ Snake &\n",
"Lil Jon\n",
"\n",
"[Old School R&B Mix 2024 | BEST 90s & 2000s R&B Party Songs](https://www.youtube.com/watch?v=1E2iltstrbU)\n",
"Get ready to ignite the dance floor with the ultimate Music Mix ! We've curated the hottest tracks and hits to \n",
"ensure your party is nothing short of epic. ...\n",
"\n",
"[Best Songs To Party: DJ's Ultimate Party Songs Playlist - \n",
"Top40Weekly.com](https://top40weekly.com/best-songs-to-party/)\n",
"If you're looking for the ultimate playlist to get your party started, look no further than this best party songs \n",
"playlist. Whether you're hosting a birthday bash, a backyard barbecue, or just a night in with friends, the right \n",
"music can make all the difference. From classic hits to modern bangers, we've compiled a list of the best songs ...\n",
"\n",
"[Party music mix ~ Songs to play in the party ~ Best songs that make you \n",
"...](https://www.youtube.com/watch?v=d40kl-TvBj8)\n",
"Party music mix ~ Songs to play in the party ~ Best songs that make you dance#ACmewsic #partymusic #dancesongs👍 \n",
"Suggested Video:Songs to sing in the car: ht...\n",
"\n",
"[The 55+ Best Songs About Partying, For Your Next Party Anthem - \n",
"Ranker](https://www.ranker.com/list/the-best-songs-about-parties/ranker-music)\n",
"Unveiling the best songs about partying, this collection captures the quintessential beats and lyrics that have \n",
"stood the test of time, leaving an indelible mark on the minds of music enthusiasts. Delving into the realm of top \n",
"song party hits, every entry in the compilation boasts distinct elements that contribute to its popularity and \n",
"charm.\n",
"\n",
"[111 Wedding Party Entrance Songs to Get the Party Started - The \n",
"Knot](https://www.theknot.com/content/wedding-party-entrance-songs)\n",
"Unique Wedding Party Entrance Songs . Don't be afraid to think outside of the box with these unique wedding party \n",
"entrance songs. Here are a few of our favorite underrated picks. 72. \"We Are Family,\" by Sister Sledge. From the \n",
"album: We are Family, 1979. Lyrics you'll love: \"We are family/I got all my sisters with me/We are family/Get up \n",
"...\n",
"\n",
"Out: None\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1mExecution logs:\u001b[0m\n",
"## Search Results\n",
"\n",
"[The 75 Best Party Songs That Will Get Everyone Dancing - \n",
"Gear4music](https://www.gear4music.com/blog/best-party-songs/)\n",
"The best party songs 1. \"September\" - Earth, Wind & Fire (1978) Quite possibly the best party song. An infectious \n",
"mix of funk and soul, \"September\" is celebrated for its upbeat melody and \"ba-dee-ya\" chorus, making it a timeless \n",
"dance favorite.\n",
"\n",
"[45 Songs That Get Your Event Guests on the Dance Floor Every \n",
"Time](https://hub.theeventplannerexpo.com/entertainment/35-songs-that-get-your-event-guests-on-the-dance-floor-ever\n",
"y-time)\n",
"You'll know your client's event best, including music genre preferences and styles. But these songs are wildly \n",
"popular among many generations and are always great to have on standby should your dance guests need a boost. Party\n",
"Songs \"Flowers\" by Miley Cyrus (2023) \"TQG\" by KAROL G & Shakira (2023) \"TRUSTFALL\" by P!nk (2023)\n",
"\n",
"[50 Songs on Every Event Planner's Playlist - \n",
"Eventbrite](https://www.eventbrite.com/blog/event-planning-playlist-ds00/)\n",
"Music sets the mood and provides the soundtrack (literally) for a memorable and exciting time. While the right \n",
"songs can enhance the experience, the wrong event music can throw off the vibe. For example, fast-paced songs \n",
"probably aren't the best fit for a formal gala. And smooth jazz is likely to lull your guests at a motivational \n",
"conference.\n",
"\n",
"[Wedding Party Entrance Songs to Get the Party Started - The Mansion \n",
"...](https://mansiononmainstreet.com/wedding-party-entrance-songs-to-get-the-party-started/)\n",
"Best Wedding Party Entrance Songs. No matter what vibe you're going for, there are some wedding party entrance \n",
"songs that are guaranteed to be a hit with people. ... \"Down,\" by Jay Sean ft. Lil Wayne ... The Mansion on Main \n",
"Street is a picturesque events venue wrapped in elegance and modern beauty. Situated amidst exquisitely manicured \n",
"...\n",
"\n",
"[27 Most Influential Songs About Parties & Celebrations (Must Hear)](https://www.pdmusic.org/songs-about-parties/)\n",
"Contents. 1 27 Most Famous Songs About Parties, Partying & Drinking With Friend (Ultimate Playlist); 2 #1 \"Party in\n",
"the U.S.A.\" by Miley Cyrus; 3 #2 \"I Gotta Feeling\" by The Black Eyed Peas; 4 #3 \"Party Rock Anthem\" by LMFAO; 5 #4 \n",
"\"Last Friday Night (T.G.I.F.)\" by Katy Perry; 6 #5 \"Dancing Queen\" by ABBA; 7 #6 \"Turn Down for What\" by DJ Snake &\n",
"Lil Jon\n",
"\n",
"[Old School R&B Mix 2024 | BEST 90s & 2000s R&B Party Songs](https://www.youtube.com/watch?v=1E2iltstrbU)\n",
"Get ready to ignite the dance floor with the ultimate Music Mix ! We've curated the hottest tracks and hits to \n",
"ensure your party is nothing short of epic. ...\n",
"\n",
"[Best Songs To Party: DJ's Ultimate Party Songs Playlist - \n",
"Top40Weekly.com](https://top40weekly.com/best-songs-to-party/)\n",
"If you're looking for the ultimate playlist to get your party started, look no further than this best party songs \n",
"playlist. Whether you're hosting a birthday bash, a backyard barbecue, or just a night in with friends, the right \n",
"music can make all the difference. From classic hits to modern bangers, we've compiled a list of the best songs ...\n",
"\n",
"[Party music mix ~ Songs to play in the party ~ Best songs that make you \n",
"...](https://www.youtube.com/watch?v=d40kl-TvBj8)\n",
"Party music mix ~ Songs to play in the party ~ Best songs that make you dance#ACmewsic #partymusic #dancesongs👍 \n",
"Suggested Video:Songs to sing in the car: ht...\n",
"\n",
"[The 55+ Best Songs About Partying, For Your Next Party Anthem - \n",
"Ranker](https://www.ranker.com/list/the-best-songs-about-parties/ranker-music)\n",
"Unveiling the best songs about partying, this collection captures the quintessential beats and lyrics that have \n",
"stood the test of time, leaving an indelible mark on the minds of music enthusiasts. Delving into the realm of top \n",
"song party hits, every entry in the compilation boasts distinct elements that contribute to its popularity and \n",
"charm.\n",
"\n",
"[111 Wedding Party Entrance Songs to Get the Party Started - The \n",
"Knot](https://www.theknot.com/content/wedding-party-entrance-songs)\n",
"Unique Wedding Party Entrance Songs . Don't be afraid to think outside of the box with these unique wedding party \n",
"entrance songs. Here are a few of our favorite underrated picks. 72. \"We Are Family,\" by Sister Sledge. From the \n",
"album: We are Family, 1979. Lyrics you'll love: \"We are family/I got all my sisters with me/We are family/Get up \n",
"...\n",
"\n",
"Out: None\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 2: Duration 14.49 seconds| Input tokens: 5,762 | Output tokens: 165]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 2: Duration 14.49 seconds| Input tokens: 5,762 | Output tokens: 165]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m3\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">playlist </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> </span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"\"\"</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">1. \"September\" - Earth, Wind & Fire</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">2. \"Uptown Funk\" - Mark Ronson ft. Bruno Mars</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">3. \"Crazy in Love\" - Beyoncé ft. Jay-Z</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">4. \"Good as Hell\" - Lizzo</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">5. \"Treasure\" - Bruno Mars</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">6. \"Get Lucky\" - Daft Punk ft. Pharrell Williams</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">7. \"Signed, Sealed, Delivered (I'm Yours)\" - Stevie Wonder</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">8. \"Dancing Queen\" - ABBA</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">9. \"Happy\" - Pharrell Williams</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">10. \"Can't Stop the Feeling!\" - Justin Timberlake</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"\"\"</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">final_answer(playlist)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mplaylist\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\"\"\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m1. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mSeptember\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m - Earth, Wind & Fire\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m2. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mUptown Funk\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m - Mark Ronson ft. Bruno Mars\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m3. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mCrazy in Love\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m - Beyoncé ft. Jay-Z\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m4. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mGood as Hell\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m - Lizzo\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m5. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mTreasure\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m - Bruno Mars\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m6. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mGet Lucky\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m - Daft Punk ft. Pharrell Williams\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m7. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mSigned, Sealed, Delivered (I\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m'\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mm Yours)\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m - Stevie Wonder\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m8. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mDancing Queen\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m - ABBA\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m9. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mHappy\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m - Pharrell Williams\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m10. \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mCan\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m'\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mt Stop the Feeling!\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m - Justin Timberlake\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34m\"\"\"\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mfinal_answer\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mplaylist\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">Out - Final answer: </span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">1. \"September\" - Earth, Wind & Fire</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">2. \"Uptown Funk\" - Mark Ronson ft. Bruno Mars</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">3. \"Crazy in Love\" - Beyoncé ft. Jay-Z</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">4. \"Good as Hell\" - Lizzo</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">5. \"Treasure\" - Bruno Mars</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">6. \"Get Lucky\" - Daft Punk ft. Pharrell Williams</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">7. \"Signed, Sealed, Delivered (I'm Yours)\" - Stevie Wonder</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">8. \"Dancing Queen\" - ABBA</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">9. \"Happy\" - Pharrell Williams</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">10. \"Can't Stop the Feeling!\" - Justin Timberlake</span>\n",
"\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;38;2;212;183;2mOut - Final answer: \u001b[0m\n",
"\u001b[1;38;2;212;183;2m1. \"September\" - Earth, Wind & Fire\u001b[0m\n",
"\u001b[1;38;2;212;183;2m2. \"Uptown Funk\" - Mark Ronson ft. Bruno Mars\u001b[0m\n",
"\u001b[1;38;2;212;183;2m3. \"Crazy in Love\" - Beyoncé ft. Jay-Z\u001b[0m\n",
"\u001b[1;38;2;212;183;2m4. \"Good as Hell\" - Lizzo\u001b[0m\n",
"\u001b[1;38;2;212;183;2m5. \"Treasure\" - Bruno Mars\u001b[0m\n",
"\u001b[1;38;2;212;183;2m6. \"Get Lucky\" - Daft Punk ft. Pharrell Williams\u001b[0m\n",
"\u001b[1;38;2;212;183;2m7. \"Signed, Sealed, Delivered (I'm Yours)\" - Stevie Wonder\u001b[0m\n",
"\u001b[1;38;2;212;183;2m8. \"Dancing Queen\" - ABBA\u001b[0m\n",
"\u001b[1;38;2;212;183;2m9. \"Happy\" - Pharrell Williams\u001b[0m\n",
"\u001b[1;38;2;212;183;2m10. \"Can't Stop the Feeling!\" - Justin Timberlake\u001b[0m\n",
"\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 3: Duration 3.61 seconds| Input tokens: 10,597 | Output tokens: 619]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 3: Duration 3.61 seconds| Input tokens: 10,597 | Output tokens: 619]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'\\n1. \"September\" - Earth, Wind & Fire\\n2. \"Uptown Funk\" - Mark Ronson ft. Bruno Mars\\n3. \"Crazy in Love\" - Beyoncé ft. Jay-Z\\n4. \"Good as Hell\" - Lizzo\\n5. \"Treasure\" - Bruno Mars\\n6. \"Get Lucky\" - Daft Punk ft. Pharrell Williams\\n7. \"Signed, Sealed, Delivered (I\\'m Yours)\" - Stevie Wonder\\n8. \"Dancing Queen\" - ABBA\\n9. \"Happy\" - Pharrell Williams\\n10. \"Can\\'t Stop the Feeling!\" - Justin Timberlake\\n'"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from smolagents import CodeAgent, DuckDuckGoSearchTool, LiteLLMModel \n",
"\n",
"model = LiteLLMModel(\n",
" model_id=\"gemini/gemini-2.0-flash-lite-001\",\n",
" temperature=0.7,\n",
" api_key=\"\")\n",
"\n",
"\n",
"\n",
"agent = CodeAgent(tools=[DuckDuckGoSearchTool()],\n",
" model=model)\n",
"\n",
"agent.run(\"Search for the best music recommendations for a party at the Wayne's mansion.\")\n"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">╭──────────────────────────────────────────────────── </span><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">New run</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ────────────────────────────────────────────────────╮</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\">Prepare a formal menu for the party.</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">╰─ LiteLLMModel - gemini/gemini-2.0-flash-lite-001 ───────────────────────────────────────────────────────────────╯</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m╭─\u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[1;38;2;212;183;2mNew run\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╮\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[1mPrepare a formal menu for the party.\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m╰─\u001b[0m\u001b[38;2;212;183;2m LiteLLMModel - gemini/gemini-2.0-flash-lite-001 \u001b[0m\u001b[38;2;212;183;2m──────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m1\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">menu </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> suggest_menu(occasion</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"party\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(menu)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mmenu\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34msuggest_menu\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34moccasion\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mparty\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mmenu\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Execution logs:</span>\n",
"Custom menu for the butler.\n",
"\n",
"Out: None\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1mExecution logs:\u001b[0m\n",
"Custom menu for the butler.\n",
"\n",
"Out: None\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 1: Duration 2.57 seconds| Input tokens: 2,228 | Output tokens: 74]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 1: Duration 2.57 seconds| Input tokens: 2,228 | Output tokens: 74]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m2\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">final_answer(</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"Custom menu for the butler.\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mfinal_answer\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mCustom menu for the butler.\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">Out - Final answer: Custom menu for the butler.</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;38;2;212;183;2mOut - Final answer: Custom menu for the butler.\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 2: Duration 0.94 seconds| Input tokens: 4,611 | Output tokens: 134]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 2: Duration 0.94 seconds| Input tokens: 4,611 | Output tokens: 134]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"'Custom menu for the butler.'"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from smolagents import CodeAgent, tool\n",
"\n",
"@tool\n",
"def suggest_menu(occasion: str) -> str:\n",
" \"\"\"\n",
" Suggests a menu based on the occasion.\n",
" Args:\n",
" occasion: The type of occasion for the party.\n",
" \"\"\"\n",
" if occasion == \"casual\":\n",
" return \"Pizza, snacks, and drinks.\"\n",
" elif occasion == \"formal\":\n",
" return \"3-course dinner with wine and dessert.\"\n",
" elif occasion == \"superhero\":\n",
" return \"Buffet with high-energy and healthy food.\"\n",
" else:\n",
" return \"Custom menu for the butler.\"\n",
"\n",
"agent = CodeAgent(tools=[suggest_menu], model=model)\n",
"\n",
"agent.run(\"Prepare a formal menu for the party.\")"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">╭──────────────────────────────────────────────────── </span><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">New run</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ────────────────────────────────────────────────────╮</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\">Alfred needs to prepare for the party. Here are the tasks:</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\"> 1. Prepare the drinks - 30 minutes</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\"> 2. Decorate the mansion - 60 minutes</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\"> 3. Set up the menu - 45 minutes</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\"> 3. Prepare the music and playlist - 45 minutes</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\"> If we start right now, at what time will the party be ready?</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">╰─ LiteLLMModel - gemini/gemini-2.0-flash-lite-001 ───────────────────────────────────────────────────────────────╯</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m╭─\u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[1;38;2;212;183;2mNew run\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╮\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[1mAlfred needs to prepare for the party. Here are the tasks:\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[1m 1. Prepare the drinks - 30 minutes\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[1m 2. Decorate the mansion - 60 minutes\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[1m 3. Set up the menu - 45 minutes\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[1m 3. Prepare the music and playlist - 45 minutes\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[1m If we start right now, at what time will the party be ready?\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m╰─\u001b[0m\u001b[38;2;212;183;2m LiteLLMModel - gemini/gemini-2.0-flash-lite-001 \u001b[0m\u001b[38;2;212;183;2m──────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m1\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">from</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> datetime </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">import</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> datetime, timedelta</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">drink_prep </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> </span><span style=\"color: #ae81ff; text-decoration-color: #ae81ff; background-color: #272822\">30</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">decorate </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> </span><span style=\"color: #ae81ff; text-decoration-color: #ae81ff; background-color: #272822\">60</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">menu_setup </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> </span><span style=\"color: #ae81ff; text-decoration-color: #ae81ff; background-color: #272822\">45</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">music_prep </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> </span><span style=\"color: #ae81ff; text-decoration-color: #ae81ff; background-color: #272822\">45</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">total_minutes </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> drink_prep </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">+</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> decorate </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">+</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> menu_setup </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">+</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> music_prep</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">f\"Total time in minutes: {</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">total_minutes</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">}\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;255;70;137;48;2;39;40;34mfrom\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mdatetime\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34mimport\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mdatetime\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m,\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mtimedelta\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mdrink_prep\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;174;129;255;48;2;39;40;34m30\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mdecorate\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;174;129;255;48;2;39;40;34m60\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mmenu_setup\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;174;129;255;48;2;39;40;34m45\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mmusic_prep\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;174;129;255;48;2;39;40;34m45\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mtotal_minutes\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mdrink_prep\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m+\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mdecorate\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m+\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mmenu_setup\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m+\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mmusic_prep\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mf\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mTotal time in minutes: \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m{\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mtotal_minutes\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m}\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Execution logs:</span>\n",
"Total time in minutes: 180\n",
"\n",
"Out: None\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1mExecution logs:\u001b[0m\n",
"Total time in minutes: 180\n",
"\n",
"Out: None\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 1: Duration 2.67 seconds| Input tokens: 2,253 | Output tokens: 154]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 1: Duration 2.67 seconds| Input tokens: 2,253 | Output tokens: 154]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m2\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">from</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> datetime </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">import</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> datetime, timedelta</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">total_minutes </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> </span><span style=\"color: #ae81ff; text-decoration-color: #ae81ff; background-color: #272822\">180</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">hours </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> total_minutes </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">//</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> </span><span style=\"color: #ae81ff; text-decoration-color: #ae81ff; background-color: #272822\">60</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">minutes </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> total_minutes </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">%</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> </span><span style=\"color: #ae81ff; text-decoration-color: #ae81ff; background-color: #272822\">60</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">current_time </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> datetime</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">.</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">now()</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">duration </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> timedelta(hours</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">hours, minutes</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">minutes)</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">party_ready_time </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> current_time </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">+</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> duration</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">f\"Party ready time: {</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">party_ready_time</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">}\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;255;70;137;48;2;39;40;34mfrom\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mdatetime\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34mimport\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mdatetime\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m,\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mtimedelta\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mtotal_minutes\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;174;129;255;48;2;39;40;34m180\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mhours\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mtotal_minutes\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m/\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m/\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;174;129;255;48;2;39;40;34m60\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mminutes\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mtotal_minutes\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m%\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;174;129;255;48;2;39;40;34m60\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mcurrent_time\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mdatetime\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m.\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mnow\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mduration\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mtimedelta\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mhours\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mhours\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m,\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mminutes\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mminutes\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mparty_ready_time\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mcurrent_time\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m+\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mduration\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mf\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mParty ready time: \u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m{\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mparty_ready_time\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m}\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Execution logs:</span>\n",
"Party ready time: 2025-03-06 23:06:46.033418\n",
"\n",
"Out: None\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1mExecution logs:\u001b[0m\n",
"Party ready time: 2025-03-06 23:06:46.033418\n",
"\n",
"Out: None\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 2: Duration 1.66 seconds| Input tokens: 4,808 | Output tokens: 287]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 2: Duration 1.66 seconds| Input tokens: 4,808 | Output tokens: 287]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m3\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">party_ready_time </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> datetime</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">.</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">now() </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">+</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> timedelta(hours</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #ae81ff; text-decoration-color: #ae81ff; background-color: #272822\">3</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">final_answer(party_ready_time)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mparty_ready_time\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mdatetime\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m.\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mnow\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m+\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mtimedelta\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mhours\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;174;129;255;48;2;39;40;34m3\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mfinal_answer\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mparty_ready_time\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">Out - Final answer: 2025-03-06 23:06:47.144585</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;38;2;212;183;2mOut - Final answer: 2025-03-06 23:06:47.144585\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 3: Duration 1.11 seconds| Input tokens: 7,682 | Output tokens: 337]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 3: Duration 1.11 seconds| Input tokens: 7,682 | Output tokens: 337]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"datetime.datetime(2025, 3, 6, 23, 6, 47, 144585)"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"import numpy as np\n",
"import time\n",
"import datetime\n",
"\n",
"agent = CodeAgent(tools=[], model=model, additional_authorized_imports=['datetime'])\n",
"\n",
"agent.run(\n",
" \"\"\"\n",
" Alfred needs to prepare for the party. Here are the tasks:\n",
" 1. Prepare the drinks - 30 minutes\n",
" 2. Decorate the mansion - 60 minutes\n",
" 3. Set up the menu - 45 minutes\n",
" 3. Prepare the music and playlist - 45 minutes\n",
"\n",
" If we start right now, at what time will the party be ready?\n",
" \"\"\"\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">╭──────────────────────────────────────────────────── </span><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">New run</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ────────────────────────────────────────────────────╮</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"font-weight: bold\">Give me best playlist for a party at the Wayne's mansion. The party idea is a 'villain masquerade' theme</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">│</span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702\">╰─ LiteLLMModel - gemini/gemini-2.0-flash-lite-001 ───────────────────────────────────────────────────────────────╯</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m╭─\u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[1;38;2;212;183;2mNew run\u001b[0m\u001b[38;2;212;183;2m \u001b[0m\u001b[38;2;212;183;2m───────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╮\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[1mGive me best playlist for a party at the Wayne's mansion. The party idea is a 'villain masquerade' theme\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m│\u001b[0m \u001b[38;2;212;183;2m│\u001b[0m\n",
"\u001b[38;2;212;183;2m╰─\u001b[0m\u001b[38;2;212;183;2m LiteLLMModel - gemini/gemini-2.0-flash-lite-001 \u001b[0m\u001b[38;2;212;183;2m──────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;212;183;2m─╯\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m1\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold; font-style: italic\">Output message of the LLM:</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">────────────────────────────────────────────────────────────────────────────────────────</span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">Thought: I need to create a playlist for a villain masquerade party at Wayne's mansion. I will use the </span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">`suggest_menu`</span><span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\"> tool to get some general party ideas, then </span><span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">`web_search`</span><span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\"> to search for relevant songs.</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">Code:</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">```py</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">party_theme </span><span style=\"color: #ff7b72; text-decoration-color: #ff7b72; background-color: #0d1117; font-weight: bold\">=</span><span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\"> superhero_party_theme_generator(category</span><span style=\"color: #ff7b72; text-decoration-color: #ff7b72; background-color: #0d1117; font-weight: bold\">=</span><span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">\"villain masquerade\"</span><span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">)</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">print(party_theme)</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">```</span><span style=\"background-color: #0d1117\"> </span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;3mOutput message of the LLM:\u001b[0m \u001b[38;2;212;183;2m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mThought:\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mneed\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mto\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcreate\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mplaylist\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mfor\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mvillain\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mmasquerade\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mparty\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mat\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mWayne's\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mmansion.\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mwill\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23muse\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23m`suggest_menu`\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mtool\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mto\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mget\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msome\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mgeneral\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mparty\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mideas,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthen\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m`web_search`\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mto\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msearch\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mfor\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mrelevant\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msongs.\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mCode:\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mpy\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mparty_theme\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[1;38;2;255;123;114;48;2;13;17;23m=\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msuperhero_party_theme_generator\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m(\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcategory\u001b[0m\u001b[1;38;2;255;123;114;48;2;13;17;23m=\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mvillain masquerade\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m)\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mprint\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m(\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mparty_theme\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m)\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">party_theme </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> superhero_party_theme_generator(category</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"villain masquerade\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(party_theme)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mparty_theme\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34msuperhero_party_theme_generator\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mcategory\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mvillain masquerade\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mparty_theme\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Execution logs:</span>\n",
"Gotham Rogues' Ball: A mysterious masquerade where guests dress as classic Batman villains.\n",
"\n",
"Out: None\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1mExecution logs:\u001b[0m\n",
"Gotham Rogues' Ball: A mysterious masquerade where guests dress as classic Batman villains.\n",
"\n",
"Out: None\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 1: Duration 5.14 seconds| Input tokens: 2,519 | Output tokens: 81]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 1: Duration 5.14 seconds| Input tokens: 2,519 | Output tokens: 81]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m2\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold; font-style: italic\">Output message of the LLM:</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">────────────────────────────────────────────────────────────────────────────────────────</span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">Thought: I have the party theme: Gotham Rogues' Ball. Now, I'll search for playlist ideas. I will use the </span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">web_search tool.</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">Code:</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">```py</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">playlist_search </span><span style=\"color: #ff7b72; text-decoration-color: #ff7b72; background-color: #0d1117; font-weight: bold\">=</span><span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\"> web_search(query</span><span style=\"color: #ff7b72; text-decoration-color: #ff7b72; background-color: #0d1117; font-weight: bold\">=</span><span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">\"playlist for villain masquerade party\"</span><span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">)</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">print(playlist_search)</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">```</span><span style=\"background-color: #0d1117\"> </span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;3mOutput message of the LLM:\u001b[0m \u001b[38;2;212;183;2m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mThought:\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mhave\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mparty\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mtheme:\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mGotham\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mRogues'\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mBall.\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mNow,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI'll\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msearch\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mfor\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mplaylist\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mideas.\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mwill\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23muse\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mweb_search\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mtool.\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mCode:\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mpy\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mplaylist_search\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[1;38;2;255;123;114;48;2;13;17;23m=\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mweb_search\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m(\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mquery\u001b[0m\u001b[1;38;2;255;123;114;48;2;13;17;23m=\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mplaylist for villain masquerade party\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m)\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mprint\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m(\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mplaylist_search\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m)\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">playlist_search </span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\"> web_search(query</span><span style=\"color: #ff4689; text-decoration-color: #ff4689; background-color: #272822\">=</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"playlist for villain masquerade party\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">print(playlist_search)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mplaylist_search\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m \u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mweb_search\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mquery\u001b[0m\u001b[38;2;255;70;137;48;2;39;40;34m=\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mplaylist for villain masquerade party\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mprint\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34mplaylist_search\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Execution logs:</span>\n",
"## Search Results\n",
"\n",
"[Masquerade party music - playlist by drew - Spotify](https://open.spotify.com/playlist/3gICKSayCeN6muUWNGHeK4)\n",
"Playlist · Masquerade party music 🎭 · 38 items · 8 saves\n",
"\n",
"[you're at a masquerade and unknowingly dancing with the \n",
"villain](https://open.spotify.com/playlist/4zxYvQs9gByjRhAn5ujSfQ)\n",
"you're at a masquerade and unknowingly dancing with the villain · Playlist · 89 songs · 10 likes\n",
"\n",
"[you're at a masquerade and unknowingly dancing with your ... - \n",
"YouTube](https://www.youtube.com/watch?v=e1ic7bV9dtA)\n",
"ahh I literally couldn't wait to post this, so here is an upload a day early!! lets be honest, we come here for the\n",
"music and stay for the povs. I totally di...\n",
"\n",
"[Villain Playlist - YouTube Music](https://music.youtube.com/playlist?list=PLSUxcl7M9WV5zowHmaFGBYkdA2xfaCuuh)\n",
"Songs with villain energy wether it be songs that give villain origin story vibes, evil monologue energy, the \n",
"actions of a current villain, or songs giving the energy of the chemistry between a few villain characters, they go\n",
"here! some of them might not seem villain like at first, but when you listen to them with the perspective of \n",
"possibly being about / related to a villain character, it ...\n",
"\n",
"[dancing with your enemy at a masquerade ball - playlist by ... - \n",
"Spotify](https://open.spotify.com/playlist/0zNqQEIlXMRKi3bBgccKWv)\n",
"Playlist · dancing with your enemy at a masquerade ball · 25 items · 8.9K likes\n",
"\n",
"[a stormy night, an ancient castle, and a vampire masquerade (dark \n",
"...](https://www.youtube.com/watch?v=i9yqAmS5DiY)\n",
"⋅ • ☾ Travelling through the woods one dark evening, you are caught in a storm, but fortunately, an abandoned \n",
"palace looms ahead. Entering, you find myster...\n",
"\n",
"[Villain Party Playlist to Boost Your Confidence ️ ... - YouTube](https://www.youtube.com/watch?v=cW2tfICi7yc)\n",
"Welcome to my Hype Mix ️🔥 Let's get down and dirty this week and party it up 💃🏼!! I hope this playlist brings you a\n",
"Confidence Boost and get you ready t...\n",
"\n",
"[villain Playlist - YouTube Music](https://music.youtube.com/playlist?list=PLeHmu1wrqUW7XZdaCUTHE3bah5Y3a3hux)\n",
"With the YouTube Music app, enjoy over 100 million songs at your fingertips, plus albums, playlists, remixes, music\n",
"videos, live performances, covers, and hard-to-find music you can't get anywhere else.\n",
"\n",
"[The 99 Best Songs for Villains (Our Villain Arc Playlist) - \n",
"iSpyTunes](https://www.ispytunes.com/post/best-songs-for-villains)\n",
"With our handpicked villain playlist with 99 of the best songs, we invite you to immerse yourself in the world of \n",
"darkness, power, and redemption. Whether you are a storyteller seeking inspiration or a listener looking for an \n",
"exhilarating musical experience, this playlist offers a journey into the minds and hearts of a villain.\n",
"\n",
"[Masquerade Ball Party | Best in 2025 - Classpop](https://www.classpop.com/magazine/masquerade-ball-party)\n",
"Superheroes and villains; Black and white; Roaring '20s; Angels and demons ... Music is a must. Even if you're not \n",
"going with an all-out ball gown bash theme, you'll want to have a great playlist. For a traditional period, go with\n",
"classical music like Vivaldi, Strauss, Beethoven or Mozart. ... While costumes are not necessarily required ...\n",
"\n",
"Out: None\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1mExecution logs:\u001b[0m\n",
"## Search Results\n",
"\n",
"[Masquerade party music - playlist by drew - Spotify](https://open.spotify.com/playlist/3gICKSayCeN6muUWNGHeK4)\n",
"Playlist · Masquerade party music 🎭 · 38 items · 8 saves\n",
"\n",
"[you're at a masquerade and unknowingly dancing with the \n",
"villain](https://open.spotify.com/playlist/4zxYvQs9gByjRhAn5ujSfQ)\n",
"you're at a masquerade and unknowingly dancing with the villain · Playlist · 89 songs · 10 likes\n",
"\n",
"[you're at a masquerade and unknowingly dancing with your ... - \n",
"YouTube](https://www.youtube.com/watch?v=e1ic7bV9dtA)\n",
"ahh I literally couldn't wait to post this, so here is an upload a day early!! lets be honest, we come here for the\n",
"music and stay for the povs. I totally di...\n",
"\n",
"[Villain Playlist - YouTube Music](https://music.youtube.com/playlist?list=PLSUxcl7M9WV5zowHmaFGBYkdA2xfaCuuh)\n",
"Songs with villain energy wether it be songs that give villain origin story vibes, evil monologue energy, the \n",
"actions of a current villain, or songs giving the energy of the chemistry between a few villain characters, they go\n",
"here! some of them might not seem villain like at first, but when you listen to them with the perspective of \n",
"possibly being about / related to a villain character, it ...\n",
"\n",
"[dancing with your enemy at a masquerade ball - playlist by ... - \n",
"Spotify](https://open.spotify.com/playlist/0zNqQEIlXMRKi3bBgccKWv)\n",
"Playlist · dancing with your enemy at a masquerade ball · 25 items · 8.9K likes\n",
"\n",
"[a stormy night, an ancient castle, and a vampire masquerade (dark \n",
"...](https://www.youtube.com/watch?v=i9yqAmS5DiY)\n",
"⋅ • ☾ Travelling through the woods one dark evening, you are caught in a storm, but fortunately, an abandoned \n",
"palace looms ahead. Entering, you find myster...\n",
"\n",
"[Villain Party Playlist to Boost Your Confidence ️ ... - YouTube](https://www.youtube.com/watch?v=cW2tfICi7yc)\n",
"Welcome to my Hype Mix ️🔥 Let's get down and dirty this week and party it up 💃🏼!! I hope this playlist brings you a\n",
"Confidence Boost and get you ready t...\n",
"\n",
"[villain Playlist - YouTube Music](https://music.youtube.com/playlist?list=PLeHmu1wrqUW7XZdaCUTHE3bah5Y3a3hux)\n",
"With the YouTube Music app, enjoy over 100 million songs at your fingertips, plus albums, playlists, remixes, music\n",
"videos, live performances, covers, and hard-to-find music you can't get anywhere else.\n",
"\n",
"[The 99 Best Songs for Villains (Our Villain Arc Playlist) - \n",
"iSpyTunes](https://www.ispytunes.com/post/best-songs-for-villains)\n",
"With our handpicked villain playlist with 99 of the best songs, we invite you to immerse yourself in the world of \n",
"darkness, power, and redemption. Whether you are a storyteller seeking inspiration or a listener looking for an \n",
"exhilarating musical experience, this playlist offers a journey into the minds and hearts of a villain.\n",
"\n",
"[Masquerade Ball Party | Best in 2025 - Classpop](https://www.classpop.com/magazine/masquerade-ball-party)\n",
"Superheroes and villains; Black and white; Roaring '20s; Angels and demons ... Music is a must. Even if you're not \n",
"going with an all-out ball gown bash theme, you'll want to have a great playlist. For a traditional period, go with\n",
"classical music like Vivaldi, Strauss, Beethoven or Mozart. ... While costumes are not necessarily required ...\n",
"\n",
"Out: None\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 2: Duration 3.63 seconds| Input tokens: 5,220 | Output tokens: 146]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 2: Duration 3.63 seconds| Input tokens: 5,220 | Output tokens: 146]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ </span><span style=\"font-weight: bold\">Step </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span><span style=\"color: #d4b702; text-decoration-color: #d4b702\"> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[38;2;212;183;2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \u001b[0m\u001b[1mStep \u001b[0m\u001b[1;36m3\u001b[0m\u001b[38;2;212;183;2m ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold; font-style: italic\">Output message of the LLM:</span> <span style=\"color: #d4b702; text-decoration-color: #d4b702\">────────────────────────────────────────────────────────────────────────────────────────</span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">Thought: Based on the search results, I can create a playlist with songs that fit the \"villain masquerade\" theme. I</span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">will use a combination of instrumental pieces, songs with a dark or mysterious vibe, and perhaps some classic </span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">villain-themed songs. I can't provide a specific list of songs, but I can provide a general description of the </span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">music style.</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">Code:</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">```py</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">final_answer(</span><span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">\"For a villain masquerade party at Wayne's mansion, the playlist should include a mix of orchestral or</span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers), along with songs </span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and perhaps some electronic </span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">music with a gothic or industrial sound. The goal is to create an atmosphere of intrigue and suspense, fitting the </span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">theme.\"</span><span style=\"color: #e6edf3; text-decoration-color: #e6edf3; background-color: #0d1117\">)</span><span style=\"background-color: #0d1117\"> </span>\n",
"<span style=\"color: #a5d6ff; text-decoration-color: #a5d6ff; background-color: #0d1117\">```</span><span style=\"background-color: #0d1117\"> </span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;3mOutput message of the LLM:\u001b[0m \u001b[38;2;212;183;2m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mThought:\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mBased\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mon\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msearch\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mresults,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcan\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcreate\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mplaylist\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mwith\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msongs\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthat\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mfit\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m\"villain\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mmasquerade\"\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mtheme.\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mwill\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23muse\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcombination\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mof\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23minstrumental\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mpieces,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msongs\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mwith\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mdark\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mor\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mmysterious\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mvibe,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mand\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mperhaps\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msome\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mclassic\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mvillain-themed\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msongs.\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcan't\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mprovide\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mspecific\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mlist\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mof\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23msongs,\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mbut\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mI\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mcan\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mprovide\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23ma\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mgeneral\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mdescription\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mof\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mthe\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mmusic\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m \u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23mstyle.\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mCode:\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mpy\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;230;237;243;48;2;13;17;23mfinal_answer\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m(\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23mFor a villain masquerade party at Wayne\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m'\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23ms mansion, the playlist should include a mix of orchestral or\u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23minstrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers), along with songs \u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23mthat have a dark or slightly sinister vibe. Incorporate some classic villain themes, and perhaps some electronic \u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23mmusic with a gothic or industrial sound. The goal is to create an atmosphere of intrigue and suspense, fitting the \u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23mtheme.\u001b[0m\u001b[38;2;165;214;255;48;2;13;17;23m\"\u001b[0m\u001b[38;2;230;237;243;48;2;13;17;23m)\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n",
"\u001b[38;2;165;214;255;48;2;13;17;23m```\u001b[0m\u001b[48;2;13;17;23m \u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ─ <span style=\"font-weight: bold\">Executing parsed code:</span> ──────────────────────────────────────────────────────────────────────────────────────── \n",
" <span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">final_answer(</span><span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">\"For a villain masquerade party at Wayne's mansion, the playlist should include a mix of </span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">orchestral or instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers),</span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">along with songs that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and </span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">perhaps some electronic music with a gothic or industrial sound. The goal is to create an atmosphere of </span><span style=\"background-color: #272822\"> </span> \n",
" <span style=\"color: #e6db74; text-decoration-color: #e6db74; background-color: #272822\">intrigue and suspense, fitting the theme.\"</span><span style=\"color: #f8f8f2; text-decoration-color: #f8f8f2; background-color: #272822\">)</span><span style=\"background-color: #272822\"> </span> \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n",
"</pre>\n"
],
"text/plain": [
" ─ \u001b[1mExecuting parsed code:\u001b[0m ──────────────────────────────────────────────────────────────────────────────────────── \n",
" \u001b[38;2;248;248;242;48;2;39;40;34mfinal_answer\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m(\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34mFor a villain masquerade party at Wayne\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m'\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34ms mansion, the playlist should include a mix of \u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34morchestral or instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers),\u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34malong with songs that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and \u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34mperhaps some electronic music with a gothic or industrial sound. The goal is to create an atmosphere of \u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" \u001b[38;2;230;219;116;48;2;39;40;34mintrigue and suspense, fitting the theme.\u001b[0m\u001b[38;2;230;219;116;48;2;39;40;34m\"\u001b[0m\u001b[38;2;248;248;242;48;2;39;40;34m)\u001b[0m\u001b[48;2;39;40;34m \u001b[0m \n",
" ───────────────────────────────────────────────────────────────────────────────────────────────────────────────── \n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">Out - Final answer: For a villain masquerade party at Wayne's mansion, the playlist should include a mix of </span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">orchestral or instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers), </span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">along with songs that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and perhaps </span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">some electronic music with a gothic or industrial sound. The goal is to create an atmosphere of intrigue and </span>\n",
"<span style=\"color: #d4b702; text-decoration-color: #d4b702; font-weight: bold\">suspense, fitting the theme.</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1;38;2;212;183;2mOut - Final answer: For a villain masquerade party at Wayne's mansion, the playlist should include a mix of \u001b[0m\n",
"\u001b[1;38;2;212;183;2morchestral or instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers), \u001b[0m\n",
"\u001b[1;38;2;212;183;2malong with songs that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and perhaps \u001b[0m\n",
"\u001b[1;38;2;212;183;2msome electronic music with a gothic or industrial sound. The goal is to create an atmosphere of intrigue and \u001b[0m\n",
"\u001b[1;38;2;212;183;2msuspense, fitting the theme.\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">[Step 3: Duration 1.95 seconds| Input tokens: 8,930 | Output tokens: 315]</span>\n",
"</pre>\n"
],
"text/plain": [
"\u001b[2m[Step 3: Duration 1.95 seconds| Input tokens: 8,930 | Output tokens: 315]\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"\"For a villain masquerade party at Wayne's mansion, the playlist should include a mix of orchestral or instrumental pieces with a dramatic and mysterious feel (think Hans Zimmer or similar composers), along with songs that have a dark or slightly sinister vibe. Incorporate some classic villain themes, and perhaps some electronic music with a gothic or industrial sound. The goal is to create an atmosphere of intrigue and suspense, fitting the theme.\""
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from smolagents import VisitWebpageTool, FinalAnswerTool, Tool, tool\n",
"\n",
"@tool\n",
"def suggest_menu(occasion: str) -> str:\n",
" \"\"\"\n",
" Suggests a menu based on the occasion.\n",
" Args:\n",
" occasion: The type of occasion for the party.\n",
" \"\"\"\n",
" if occasion == \"casual\":\n",
" return \"Pizza, snacks, and drinks.\"\n",
" elif occasion == \"formal\":\n",
" return \"3-course dinner with wine and dessert.\"\n",
" elif occasion == \"superhero\":\n",
" return \"Buffet with high-energy and healthy food.\"\n",
" else:\n",
" return \"Custom menu for the butler.\"\n",
"\n",
"@tool\n",
"def catering_service_tool(query: str) -> str:\n",
" \"\"\"\n",
" This tool returns the highest-rated catering service in Gotham City.\n",
"\n",
" Args:\n",
" query: A search term for finding catering services.\n",
" \"\"\"\n",
" # Example list of catering services and their ratings\n",
" services = {\n",
" \"Gotham Catering Co.\": 4.9,\n",
" \"Wayne Manor Catering\": 4.8,\n",
" \"Gotham City Events\": 4.7,\n",
" }\n",
"\n",
" # Find the highest rated catering service (simulating search query filtering)\n",
" best_service = max(services, key=services.get)\n",
"\n",
" return best_service\n",
"\n",
"class SuperheroPartyThemeTool(Tool):\n",
" name = \"superhero_party_theme_generator\"\n",
" description = \"\"\"\n",
" This tool suggests creative superhero-themed party ideas based on a category.\n",
" It returns a unique party theme idea.\"\"\"\n",
"\n",
" inputs = {\n",
" \"category\": {\n",
" \"type\": \"string\",\n",
" \"description\": \"The type of superhero party (e.g., 'classic heroes', 'villain masquerade', 'futuristic Gotham').\",\n",
" }\n",
" }\n",
"\n",
" output_type = \"string\"\n",
"\n",
" def forward(self, category: str):\n",
" themes = {\n",
" \"classic heroes\": \"Justice League Gala: Guests come dressed as their favorite DC heroes with themed cocktails like 'The Kryptonite Punch'.\",\n",
" \"villain masquerade\": \"Gotham Rogues' Ball: A mysterious masquerade where guests dress as classic Batman villains.\",\n",
" \"futuristic Gotham\": \"Neo-Gotham Night: A cyberpunk-style party inspired by Batman Beyond, with neon decorations and futuristic gadgets.\"\n",
" }\n",
"\n",
" return themes.get(category.lower(), \"Themed party idea not found. Try 'classic heroes', 'villain masquerade', or 'futuristic Gotham'.\")\n",
"\n",
"\n",
"# Alfred, the butler, preparing the menu for the party\n",
"agent = CodeAgent(\n",
" tools=[\n",
" DuckDuckGoSearchTool(),\n",
" VisitWebpageTool(),\n",
" suggest_menu,\n",
" catering_service_tool,\n",
" SuperheroPartyThemeTool()\n",
" ],\n",
" model=model,\n",
" max_steps=10,\n",
" verbosity_level=2\n",
")\n",
"\n",
"agent.run(\"Give me best playlist for a party at the Wayne's mansion. The party idea is a 'villain masquerade' theme\")"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d6ec1a2b13a34ca19ede0df5888fb427",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"README.md: 0%| | 0.00/278 [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"No files have been modified since last commit. Skipping to prevent empty commit.\n"
]
},
{
"ename": "SyntaxError",
"evalue": "closing parenthesis ')' does not match opening parenthesis '[' on line 9 (<unknown>, line 11)",
"output_type": "error",
"traceback": [
"Traceback \u001b[0;36m(most recent call last)\u001b[0m:\n",
"\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/IPython/core/interactiveshell.py:3577\u001b[0m in \u001b[1;35mrun_code\u001b[0m\n exec(code_obj, self.user_global_ns, self.user_ns)\u001b[0m\n",
"\u001b[0m Cell \u001b[1;32mIn[26], line 1\u001b[0m\n agent.push_to_hub('MartinHummel/AlfredAgent')\u001b[0m\n",
"\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/agents.py:987\u001b[0m in \u001b[1;35mpush_to_hub\u001b[0m\n self.save(work_dir)\u001b[0m\n",
"\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/agents.py:714\u001b[0m in \u001b[1;35msave\u001b[0m\n tool.save(os.path.join(output_dir, \"tools\"), tool_file_name=tool.name, make_gradio_app=False)\u001b[0m\n",
"\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/tools.py:286\u001b[0m in \u001b[1;35msave\u001b[0m\n tool_dict = self.to_dict()\u001b[0m\n",
"\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/tools.py:258\u001b[0m in \u001b[1;35mto_dict\u001b[0m\n validate_tool_attributes(self.__class__)\u001b[0m\n",
"\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/tool_validation.py:205\u001b[0m in \u001b[1;35mvalidate_tool_attributes\u001b[0m\n source = get_source(cls)\u001b[0m\n",
"\u001b[0m File \u001b[1;32m~/.pyenv/versions/agents/lib/python3.11/site-packages/smolagents/utils.py:412\u001b[0m in \u001b[1;35mget_source\u001b[0m\n tree = ast.parse(all_cells)\u001b[0m\n",
"\u001b[0;36m File \u001b[0;32m~/.pyenv/versions/3.11.4/lib/python3.11/ast.py:50\u001b[0;36m in \u001b[0;35mparse\u001b[0;36m\n\u001b[0;31m return compile(source, filename, mode, flags,\u001b[0;36m\n",
"\u001b[0;36m File \u001b[0;32m<unknown>:11\u001b[0;36m\u001b[0m\n\u001b[0;31m add_base_tools=True)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m closing parenthesis ')' does not match opening parenthesis '[' on line 9\n"
]
}
],
"source": [
"agent.push_to_hub('MartinHummel/AlfredAgent')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "agents",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|