|
62 | 62 | }, |
63 | 63 | { |
64 | 64 | "cell_type": "code", |
65 | | - "execution_count": null, |
| 65 | + "execution_count": 36, |
66 | 66 | "metadata": {}, |
67 | 67 | "outputs": [], |
68 | 68 | "source": [ |
|
90 | 90 | }, |
91 | 91 | { |
92 | 92 | "cell_type": "code", |
93 | | - "execution_count": null, |
| 93 | + "execution_count": 37, |
94 | 94 | "metadata": {}, |
95 | | - "outputs": [], |
| 95 | + "outputs": [ |
| 96 | + { |
| 97 | + "name": "stdout", |
| 98 | + "output_type": "stream", |
| 99 | + "text": [ |
| 100 | + "Repository already exists at /tmp/anthropic-quickstarts\n" |
| 101 | + ] |
| 102 | + } |
| 103 | + ], |
96 | 104 | "source": [ |
97 | 105 | "import sys \n", |
98 | 106 | "import os\n", |
|
124 | 132 | }, |
125 | 133 | { |
126 | 134 | "cell_type": "code", |
127 | | - "execution_count": null, |
| 135 | + "execution_count": 38, |
128 | 136 | "metadata": {}, |
129 | | - "outputs": [], |
| 137 | + "outputs": [ |
| 138 | + { |
| 139 | + "name": "stdout", |
| 140 | + "output_type": "stream", |
| 141 | + "text": [ |
| 142 | + "*eye roll* Another laptop crisis. What's it doing? Singing off-key? Refusing to work unless you feed it cookies? Details, please.\n" |
| 143 | + ] |
| 144 | + } |
| 145 | + ], |
130 | 146 | "source": [ |
131 | 147 | "import nest_asyncio\n", |
132 | 148 | "nest_asyncio.apply()\n", |
|
166 | 182 | }, |
167 | 183 | { |
168 | 184 | "cell_type": "code", |
169 | | - "execution_count": null, |
| 185 | + "execution_count": 39, |
170 | 186 | "metadata": {}, |
171 | 187 | "outputs": [], |
172 | 188 | "source": [ |
|
289 | 305 | }, |
290 | 306 | { |
291 | 307 | "cell_type": "code", |
292 | | - "execution_count": null, |
| 308 | + "execution_count": 40, |
293 | 309 | "metadata": {}, |
294 | 310 | "outputs": [], |
295 | 311 | "source": [ |
|
364 | 380 | }, |
365 | 381 | { |
366 | 382 | "cell_type": "code", |
367 | | - "execution_count": null, |
| 383 | + "execution_count": 41, |
368 | 384 | "metadata": {}, |
369 | 385 | "outputs": [], |
370 | 386 | "source": [ |
|
544 | 560 | }, |
545 | 561 | { |
546 | 562 | "cell_type": "code", |
547 | | - "execution_count": null, |
| 563 | + "execution_count": 43, |
548 | 564 | "metadata": {}, |
549 | | - "outputs": [], |
| 565 | + "outputs": [ |
| 566 | + { |
| 567 | + "data": { |
| 568 | + "text/plain": [ |
| 569 | + "[{'type': 'file',\n", |
| 570 | + " 'id': 'file_011CPaGpXxdBojQLTszA5LGp',\n", |
| 571 | + " 'size_bytes': 544347,\n", |
| 572 | + " 'created_at': '2025-05-28T16:51:06.716000Z',\n", |
| 573 | + " 'filename': 'sample.pdf',\n", |
| 574 | + " 'mime_type': 'application/pdf',\n", |
| 575 | + " 'downloadable': False},\n", |
| 576 | + " {'type': 'file',\n", |
| 577 | + " 'id': 'file_011CPYNG2Sf1cWjuCFhKJFV7',\n", |
| 578 | + " 'size_bytes': 3,\n", |
| 579 | + " 'created_at': '2025-05-27T16:41:15.335000Z',\n", |
| 580 | + " 'filename': 'number.txt',\n", |
| 581 | + " 'mime_type': 'text/plain',\n", |
| 582 | + " 'downloadable': True}]" |
| 583 | + ] |
| 584 | + }, |
| 585 | + "execution_count": 43, |
| 586 | + "metadata": {}, |
| 587 | + "output_type": "execute_result" |
| 588 | + } |
| 589 | + ], |
550 | 590 | "source": [ |
551 | 591 | "import requests\n", |
552 | 592 | "import mimetypes\n", |
|
621 | 661 | " raise ValueError(f\"Failed to upload file: {res.status_code} - {res.text}\")\n", |
622 | 662 | " \n", |
623 | 663 | "# example usage\n", |
624 | | - "file_path = \"/Users/user/Downloads/SB1029-ProjectUpdate-FINAL_020317-A11Y.pdf\" # REPLACE\n", |
| 664 | + "#file_path = \"/Users/user/Downloads/SB1029-ProjectUpdate-FINAL_020317-A11Y.pdf\" # REPLACE\n", |
625 | 665 | "storage_manager = StorageManager(os.getenv(\"ANTHROPIC_API_KEY\"))\n", |
626 | | - "uploaded = storage_manager.upload_file(file_path)\n", |
627 | | - "storage_manager.get_file_metadata(uploaded['id'])" |
| 666 | + "#uploaded = storage_manager.upload_file(file_path)\n", |
| 667 | + "#storage_manager.get_file_metadata(uploaded['id'])\n", |
| 668 | + "storage_manager.list_files()[:2]" |
628 | 669 | ] |
629 | 670 | }, |
630 | 671 | { |
|
673 | 714 | }, |
674 | 715 | { |
675 | 716 | "cell_type": "code", |
676 | | - "execution_count": null, |
| 717 | + "execution_count": 44, |
677 | 718 | "metadata": {}, |
678 | | - "outputs": [], |
| 719 | + "outputs": [ |
| 720 | + { |
| 721 | + "data": { |
| 722 | + "text/plain": [ |
| 723 | + "memory\n", |
| 724 | + "├── self_managed\n", |
| 725 | + "│ ├── user_session_notes\n", |
| 726 | + "│ │ ├── ongoing_projects.txt\n", |
| 727 | + "│ │ └── preferences.txt\n", |
| 728 | + "│ └── projects\n", |
| 729 | + "│ └── building_agi.txt\n", |
| 730 | + "└── files\n", |
| 731 | + " └── projects" |
| 732 | + ] |
| 733 | + }, |
| 734 | + "execution_count": 44, |
| 735 | + "metadata": {}, |
| 736 | + "output_type": "execute_result" |
| 737 | + } |
| 738 | + ], |
679 | 739 | "source": [ |
680 | 740 | "# example usage\n", |
681 | 741 | "company_agent_memory = MemoryTree()\n", |
|
700 | 760 | }, |
701 | 761 | { |
702 | 762 | "cell_type": "code", |
703 | | - "execution_count": null, |
| 763 | + "execution_count": 45, |
704 | 764 | "metadata": {}, |
705 | 765 | "outputs": [], |
706 | 766 | "source": [ |
|
0 commit comments