├── README.md ├── LICENSE ├── .gitignore └── AutoLLM.ipynb /README.md: -------------------------------------------------------------------------------- 1 | # AutoLLM-RAG-Demo 2 | AutoLLM RAG Demo built using Auto LLM library. 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 AI Anytime 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/#use-with-ide 110 | .pdm.toml 111 | 112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 113 | __pypackages__/ 114 | 115 | # Celery stuff 116 | celerybeat-schedule 117 | celerybeat.pid 118 | 119 | # SageMath parsed files 120 | *.sage.py 121 | 122 | # Environments 123 | .env 124 | .venv 125 | env/ 126 | venv/ 127 | ENV/ 128 | env.bak/ 129 | venv.bak/ 130 | 131 | # Spyder project settings 132 | .spyderproject 133 | .spyproject 134 | 135 | # Rope project settings 136 | .ropeproject 137 | 138 | # mkdocs documentation 139 | /site 140 | 141 | # mypy 142 | .mypy_cache/ 143 | .dmypy.json 144 | dmypy.json 145 | 146 | # Pyre type checker 147 | .pyre/ 148 | 149 | # pytype static type analyzer 150 | .pytype/ 151 | 152 | # Cython debug symbols 153 | cython_debug/ 154 | 155 | # PyCharm 156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 158 | # and can be added to the global gitignore or merged into this file. For a more nuclear 159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 160 | #.idea/ 161 | -------------------------------------------------------------------------------- /AutoLLM.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "provenance": [] 7 | }, 8 | "kernelspec": { 9 | "name": "python3", 10 | "display_name": "Python 3" 11 | }, 12 | "language_info": { 13 | "name": "python" 14 | }, 15 | "widgets": { 16 | "application/vnd.jupyter.widget-state+json": { 17 | "ac27341a2f4f4005be42e10cec9b2b0d": { 18 | "model_module": "@jupyter-widgets/controls", 19 | "model_name": "HBoxModel", 20 | "model_module_version": "1.5.0", 21 | "state": { 22 | "_dom_classes": [], 23 | "_model_module": "@jupyter-widgets/controls", 24 | "_model_module_version": "1.5.0", 25 | "_model_name": "HBoxModel", 26 | "_view_count": null, 27 | "_view_module": "@jupyter-widgets/controls", 28 | "_view_module_version": "1.5.0", 29 | "_view_name": "HBoxView", 30 | "box_style": "", 31 | "children": [ 32 | "IPY_MODEL_89af4988cc99475faea8f2149d51abc3", 33 | "IPY_MODEL_17d35b4db6fb4c69bf4a90cc60345e8a", 34 | "IPY_MODEL_2e959d52c5664dc584c437706b8a2dfc" 35 | ], 36 | "layout": "IPY_MODEL_b8afa23b8f96413b91e03fe4f01ac5c8" 37 | } 38 | }, 39 | "89af4988cc99475faea8f2149d51abc3": { 40 | "model_module": "@jupyter-widgets/controls", 41 | "model_name": "HTMLModel", 42 | "model_module_version": "1.5.0", 43 | "state": { 44 | "_dom_classes": [], 45 | "_model_module": "@jupyter-widgets/controls", 46 | "_model_module_version": "1.5.0", 47 | "_model_name": "HTMLModel", 48 | "_view_count": null, 49 | "_view_module": "@jupyter-widgets/controls", 50 | "_view_module_version": "1.5.0", 51 | "_view_name": "HTMLView", 52 | "description": "", 53 | "description_tooltip": null, 54 | "layout": "IPY_MODEL_6d225c2d3af2498ba7cf5c94aa27acb2", 55 | "placeholder": "​", 56 | "style": "IPY_MODEL_95566beafa5a4529b04db1a8f9b53377", 57 | "value": "Parsing documents into nodes: 100%" 58 | } 59 | }, 60 | "17d35b4db6fb4c69bf4a90cc60345e8a": { 61 | "model_module": "@jupyter-widgets/controls", 62 | "model_name": "FloatProgressModel", 63 | "model_module_version": "1.5.0", 64 | "state": { 65 | "_dom_classes": [], 66 | "_model_module": "@jupyter-widgets/controls", 67 | "_model_module_version": "1.5.0", 68 | "_model_name": "FloatProgressModel", 69 | "_view_count": null, 70 | "_view_module": "@jupyter-widgets/controls", 71 | "_view_module_version": "1.5.0", 72 | "_view_name": "ProgressView", 73 | "bar_style": "success", 74 | "description": "", 75 | "description_tooltip": null, 76 | "layout": "IPY_MODEL_600b330557564905b68cd4b662f12c4c", 77 | "max": 25, 78 | "min": 0, 79 | "orientation": "horizontal", 80 | "style": "IPY_MODEL_e76bcdd7bafb4c6f99c5e1b078c2557c", 81 | "value": 25 82 | } 83 | }, 84 | "2e959d52c5664dc584c437706b8a2dfc": { 85 | "model_module": "@jupyter-widgets/controls", 86 | "model_name": "HTMLModel", 87 | "model_module_version": "1.5.0", 88 | "state": { 89 | "_dom_classes": [], 90 | "_model_module": "@jupyter-widgets/controls", 91 | "_model_module_version": "1.5.0", 92 | "_model_name": "HTMLModel", 93 | "_view_count": null, 94 | "_view_module": "@jupyter-widgets/controls", 95 | "_view_module_version": "1.5.0", 96 | "_view_name": "HTMLView", 97 | "description": "", 98 | "description_tooltip": null, 99 | "layout": "IPY_MODEL_b4ebfef2b7884089bed47480e3822d41", 100 | "placeholder": "​", 101 | "style": "IPY_MODEL_e58a11f1d04b45a69d73a08a935443f7", 102 | "value": " 25/25 [00:00<00:00, 19.25it/s]" 103 | } 104 | }, 105 | "b8afa23b8f96413b91e03fe4f01ac5c8": { 106 | "model_module": "@jupyter-widgets/base", 107 | "model_name": "LayoutModel", 108 | "model_module_version": "1.2.0", 109 | "state": { 110 | "_model_module": "@jupyter-widgets/base", 111 | "_model_module_version": "1.2.0", 112 | "_model_name": "LayoutModel", 113 | "_view_count": null, 114 | "_view_module": "@jupyter-widgets/base", 115 | "_view_module_version": "1.2.0", 116 | "_view_name": "LayoutView", 117 | "align_content": null, 118 | "align_items": null, 119 | "align_self": null, 120 | "border": null, 121 | "bottom": null, 122 | "display": null, 123 | "flex": null, 124 | "flex_flow": null, 125 | "grid_area": null, 126 | "grid_auto_columns": null, 127 | "grid_auto_flow": null, 128 | "grid_auto_rows": null, 129 | "grid_column": null, 130 | "grid_gap": null, 131 | "grid_row": null, 132 | "grid_template_areas": null, 133 | "grid_template_columns": null, 134 | "grid_template_rows": null, 135 | "height": null, 136 | "justify_content": null, 137 | "justify_items": null, 138 | "left": null, 139 | "margin": null, 140 | "max_height": null, 141 | "max_width": null, 142 | "min_height": null, 143 | "min_width": null, 144 | "object_fit": null, 145 | "object_position": null, 146 | "order": null, 147 | "overflow": null, 148 | "overflow_x": null, 149 | "overflow_y": null, 150 | "padding": null, 151 | "right": null, 152 | "top": null, 153 | "visibility": null, 154 | "width": null 155 | } 156 | }, 157 | "6d225c2d3af2498ba7cf5c94aa27acb2": { 158 | "model_module": "@jupyter-widgets/base", 159 | "model_name": "LayoutModel", 160 | "model_module_version": "1.2.0", 161 | "state": { 162 | "_model_module": "@jupyter-widgets/base", 163 | "_model_module_version": "1.2.0", 164 | "_model_name": "LayoutModel", 165 | "_view_count": null, 166 | "_view_module": "@jupyter-widgets/base", 167 | "_view_module_version": "1.2.0", 168 | "_view_name": "LayoutView", 169 | "align_content": null, 170 | "align_items": null, 171 | "align_self": null, 172 | "border": null, 173 | "bottom": null, 174 | "display": null, 175 | "flex": null, 176 | "flex_flow": null, 177 | "grid_area": null, 178 | "grid_auto_columns": null, 179 | "grid_auto_flow": null, 180 | "grid_auto_rows": null, 181 | "grid_column": null, 182 | "grid_gap": null, 183 | "grid_row": null, 184 | "grid_template_areas": null, 185 | "grid_template_columns": null, 186 | "grid_template_rows": null, 187 | "height": null, 188 | "justify_content": null, 189 | "justify_items": null, 190 | "left": null, 191 | "margin": null, 192 | "max_height": null, 193 | "max_width": null, 194 | "min_height": null, 195 | "min_width": null, 196 | "object_fit": null, 197 | "object_position": null, 198 | "order": null, 199 | "overflow": null, 200 | "overflow_x": null, 201 | "overflow_y": null, 202 | "padding": null, 203 | "right": null, 204 | "top": null, 205 | "visibility": null, 206 | "width": null 207 | } 208 | }, 209 | "95566beafa5a4529b04db1a8f9b53377": { 210 | "model_module": "@jupyter-widgets/controls", 211 | "model_name": "DescriptionStyleModel", 212 | "model_module_version": "1.5.0", 213 | "state": { 214 | "_model_module": "@jupyter-widgets/controls", 215 | "_model_module_version": "1.5.0", 216 | "_model_name": "DescriptionStyleModel", 217 | "_view_count": null, 218 | "_view_module": "@jupyter-widgets/base", 219 | "_view_module_version": "1.2.0", 220 | "_view_name": "StyleView", 221 | "description_width": "" 222 | } 223 | }, 224 | "600b330557564905b68cd4b662f12c4c": { 225 | "model_module": "@jupyter-widgets/base", 226 | "model_name": "LayoutModel", 227 | "model_module_version": "1.2.0", 228 | "state": { 229 | "_model_module": "@jupyter-widgets/base", 230 | "_model_module_version": "1.2.0", 231 | "_model_name": "LayoutModel", 232 | "_view_count": null, 233 | "_view_module": "@jupyter-widgets/base", 234 | "_view_module_version": "1.2.0", 235 | "_view_name": "LayoutView", 236 | "align_content": null, 237 | "align_items": null, 238 | "align_self": null, 239 | "border": null, 240 | "bottom": null, 241 | "display": null, 242 | "flex": null, 243 | "flex_flow": null, 244 | "grid_area": null, 245 | "grid_auto_columns": null, 246 | "grid_auto_flow": null, 247 | "grid_auto_rows": null, 248 | "grid_column": null, 249 | "grid_gap": null, 250 | "grid_row": null, 251 | "grid_template_areas": null, 252 | "grid_template_columns": null, 253 | "grid_template_rows": null, 254 | "height": null, 255 | "justify_content": null, 256 | "justify_items": null, 257 | "left": null, 258 | "margin": null, 259 | "max_height": null, 260 | "max_width": null, 261 | "min_height": null, 262 | "min_width": null, 263 | "object_fit": null, 264 | "object_position": null, 265 | "order": null, 266 | "overflow": null, 267 | "overflow_x": null, 268 | "overflow_y": null, 269 | "padding": null, 270 | "right": null, 271 | "top": null, 272 | "visibility": null, 273 | "width": null 274 | } 275 | }, 276 | "e76bcdd7bafb4c6f99c5e1b078c2557c": { 277 | "model_module": "@jupyter-widgets/controls", 278 | "model_name": "ProgressStyleModel", 279 | "model_module_version": "1.5.0", 280 | "state": { 281 | "_model_module": "@jupyter-widgets/controls", 282 | "_model_module_version": "1.5.0", 283 | "_model_name": "ProgressStyleModel", 284 | "_view_count": null, 285 | "_view_module": "@jupyter-widgets/base", 286 | "_view_module_version": "1.2.0", 287 | "_view_name": "StyleView", 288 | "bar_color": null, 289 | "description_width": "" 290 | } 291 | }, 292 | "b4ebfef2b7884089bed47480e3822d41": { 293 | "model_module": "@jupyter-widgets/base", 294 | "model_name": "LayoutModel", 295 | "model_module_version": "1.2.0", 296 | "state": { 297 | "_model_module": "@jupyter-widgets/base", 298 | "_model_module_version": "1.2.0", 299 | "_model_name": "LayoutModel", 300 | "_view_count": null, 301 | "_view_module": "@jupyter-widgets/base", 302 | "_view_module_version": "1.2.0", 303 | "_view_name": "LayoutView", 304 | "align_content": null, 305 | "align_items": null, 306 | "align_self": null, 307 | "border": null, 308 | "bottom": null, 309 | "display": null, 310 | "flex": null, 311 | "flex_flow": null, 312 | "grid_area": null, 313 | "grid_auto_columns": null, 314 | "grid_auto_flow": null, 315 | "grid_auto_rows": null, 316 | "grid_column": null, 317 | "grid_gap": null, 318 | "grid_row": null, 319 | "grid_template_areas": null, 320 | "grid_template_columns": null, 321 | "grid_template_rows": null, 322 | "height": null, 323 | "justify_content": null, 324 | "justify_items": null, 325 | "left": null, 326 | "margin": null, 327 | "max_height": null, 328 | "max_width": null, 329 | "min_height": null, 330 | "min_width": null, 331 | "object_fit": null, 332 | "object_position": null, 333 | "order": null, 334 | "overflow": null, 335 | "overflow_x": null, 336 | "overflow_y": null, 337 | "padding": null, 338 | "right": null, 339 | "top": null, 340 | "visibility": null, 341 | "width": null 342 | } 343 | }, 344 | "e58a11f1d04b45a69d73a08a935443f7": { 345 | "model_module": "@jupyter-widgets/controls", 346 | "model_name": "DescriptionStyleModel", 347 | "model_module_version": "1.5.0", 348 | "state": { 349 | "_model_module": "@jupyter-widgets/controls", 350 | "_model_module_version": "1.5.0", 351 | "_model_name": "DescriptionStyleModel", 352 | "_view_count": null, 353 | "_view_module": "@jupyter-widgets/base", 354 | "_view_module_version": "1.2.0", 355 | "_view_name": "StyleView", 356 | "description_width": "" 357 | } 358 | }, 359 | "c41e70c75d684a538e1b04d237e74f19": { 360 | "model_module": "@jupyter-widgets/controls", 361 | "model_name": "HBoxModel", 362 | "model_module_version": "1.5.0", 363 | "state": { 364 | "_dom_classes": [], 365 | "_model_module": "@jupyter-widgets/controls", 366 | "_model_module_version": "1.5.0", 367 | "_model_name": "HBoxModel", 368 | "_view_count": null, 369 | "_view_module": "@jupyter-widgets/controls", 370 | "_view_module_version": "1.5.0", 371 | "_view_name": "HBoxView", 372 | "box_style": "", 373 | "children": [ 374 | "IPY_MODEL_0bd7c25c97874f32b941edd041d44609", 375 | "IPY_MODEL_010f0f99fda2469bb06f2dc989b7a086", 376 | "IPY_MODEL_d9228eaec40d457a980f70f10b7d7b2e" 377 | ], 378 | "layout": "IPY_MODEL_82e471ddb36648ed8701fa4a71685e40" 379 | } 380 | }, 381 | "0bd7c25c97874f32b941edd041d44609": { 382 | "model_module": "@jupyter-widgets/controls", 383 | "model_name": "HTMLModel", 384 | "model_module_version": "1.5.0", 385 | "state": { 386 | "_dom_classes": [], 387 | "_model_module": "@jupyter-widgets/controls", 388 | "_model_module_version": "1.5.0", 389 | "_model_name": "HTMLModel", 390 | "_view_count": null, 391 | "_view_module": "@jupyter-widgets/controls", 392 | "_view_module_version": "1.5.0", 393 | "_view_name": "HTMLView", 394 | "description": "", 395 | "description_tooltip": null, 396 | "layout": "IPY_MODEL_e9170080bfc5443dbbf706f4b15cf28d", 397 | "placeholder": "​", 398 | "style": "IPY_MODEL_15c46b91f028457eb9701d15ceccf4b5", 399 | "value": "Generating embeddings: 100%" 400 | } 401 | }, 402 | "010f0f99fda2469bb06f2dc989b7a086": { 403 | "model_module": "@jupyter-widgets/controls", 404 | "model_name": "FloatProgressModel", 405 | "model_module_version": "1.5.0", 406 | "state": { 407 | "_dom_classes": [], 408 | "_model_module": "@jupyter-widgets/controls", 409 | "_model_module_version": "1.5.0", 410 | "_model_name": "FloatProgressModel", 411 | "_view_count": null, 412 | "_view_module": "@jupyter-widgets/controls", 413 | "_view_module_version": "1.5.0", 414 | "_view_name": "ProgressView", 415 | "bar_style": "success", 416 | "description": "", 417 | "description_tooltip": null, 418 | "layout": "IPY_MODEL_b13a628ede3c413e912e54ec5b52363f", 419 | "max": 49, 420 | "min": 0, 421 | "orientation": "horizontal", 422 | "style": "IPY_MODEL_73384a80fe6a49ce81b729857c863785", 423 | "value": 49 424 | } 425 | }, 426 | "d9228eaec40d457a980f70f10b7d7b2e": { 427 | "model_module": "@jupyter-widgets/controls", 428 | "model_name": "HTMLModel", 429 | "model_module_version": "1.5.0", 430 | "state": { 431 | "_dom_classes": [], 432 | "_model_module": "@jupyter-widgets/controls", 433 | "_model_module_version": "1.5.0", 434 | "_model_name": "HTMLModel", 435 | "_view_count": null, 436 | "_view_module": "@jupyter-widgets/controls", 437 | "_view_module_version": "1.5.0", 438 | "_view_name": "HTMLView", 439 | "description": "", 440 | "description_tooltip": null, 441 | "layout": "IPY_MODEL_7cbb103369024485a8512f8c85c7e845", 442 | "placeholder": "​", 443 | "style": "IPY_MODEL_0cd565d753564ee7bd5524e35ddc5c7a", 444 | "value": " 49/49 [00:01<00:00, 30.71it/s]" 445 | } 446 | }, 447 | "82e471ddb36648ed8701fa4a71685e40": { 448 | "model_module": "@jupyter-widgets/base", 449 | "model_name": "LayoutModel", 450 | "model_module_version": "1.2.0", 451 | "state": { 452 | "_model_module": "@jupyter-widgets/base", 453 | "_model_module_version": "1.2.0", 454 | "_model_name": "LayoutModel", 455 | "_view_count": null, 456 | "_view_module": "@jupyter-widgets/base", 457 | "_view_module_version": "1.2.0", 458 | "_view_name": "LayoutView", 459 | "align_content": null, 460 | "align_items": null, 461 | "align_self": null, 462 | "border": null, 463 | "bottom": null, 464 | "display": null, 465 | "flex": null, 466 | "flex_flow": null, 467 | "grid_area": null, 468 | "grid_auto_columns": null, 469 | "grid_auto_flow": null, 470 | "grid_auto_rows": null, 471 | "grid_column": null, 472 | "grid_gap": null, 473 | "grid_row": null, 474 | "grid_template_areas": null, 475 | "grid_template_columns": null, 476 | "grid_template_rows": null, 477 | "height": null, 478 | "justify_content": null, 479 | "justify_items": null, 480 | "left": null, 481 | "margin": null, 482 | "max_height": null, 483 | "max_width": null, 484 | "min_height": null, 485 | "min_width": null, 486 | "object_fit": null, 487 | "object_position": null, 488 | "order": null, 489 | "overflow": null, 490 | "overflow_x": null, 491 | "overflow_y": null, 492 | "padding": null, 493 | "right": null, 494 | "top": null, 495 | "visibility": null, 496 | "width": null 497 | } 498 | }, 499 | "e9170080bfc5443dbbf706f4b15cf28d": { 500 | "model_module": "@jupyter-widgets/base", 501 | "model_name": "LayoutModel", 502 | "model_module_version": "1.2.0", 503 | "state": { 504 | "_model_module": "@jupyter-widgets/base", 505 | "_model_module_version": "1.2.0", 506 | "_model_name": "LayoutModel", 507 | "_view_count": null, 508 | "_view_module": "@jupyter-widgets/base", 509 | "_view_module_version": "1.2.0", 510 | "_view_name": "LayoutView", 511 | "align_content": null, 512 | "align_items": null, 513 | "align_self": null, 514 | "border": null, 515 | "bottom": null, 516 | "display": null, 517 | "flex": null, 518 | "flex_flow": null, 519 | "grid_area": null, 520 | "grid_auto_columns": null, 521 | "grid_auto_flow": null, 522 | "grid_auto_rows": null, 523 | "grid_column": null, 524 | "grid_gap": null, 525 | "grid_row": null, 526 | "grid_template_areas": null, 527 | "grid_template_columns": null, 528 | "grid_template_rows": null, 529 | "height": null, 530 | "justify_content": null, 531 | "justify_items": null, 532 | "left": null, 533 | "margin": null, 534 | "max_height": null, 535 | "max_width": null, 536 | "min_height": null, 537 | "min_width": null, 538 | "object_fit": null, 539 | "object_position": null, 540 | "order": null, 541 | "overflow": null, 542 | "overflow_x": null, 543 | "overflow_y": null, 544 | "padding": null, 545 | "right": null, 546 | "top": null, 547 | "visibility": null, 548 | "width": null 549 | } 550 | }, 551 | "15c46b91f028457eb9701d15ceccf4b5": { 552 | "model_module": "@jupyter-widgets/controls", 553 | "model_name": "DescriptionStyleModel", 554 | "model_module_version": "1.5.0", 555 | "state": { 556 | "_model_module": "@jupyter-widgets/controls", 557 | "_model_module_version": "1.5.0", 558 | "_model_name": "DescriptionStyleModel", 559 | "_view_count": null, 560 | "_view_module": "@jupyter-widgets/base", 561 | "_view_module_version": "1.2.0", 562 | "_view_name": "StyleView", 563 | "description_width": "" 564 | } 565 | }, 566 | "b13a628ede3c413e912e54ec5b52363f": { 567 | "model_module": "@jupyter-widgets/base", 568 | "model_name": "LayoutModel", 569 | "model_module_version": "1.2.0", 570 | "state": { 571 | "_model_module": "@jupyter-widgets/base", 572 | "_model_module_version": "1.2.0", 573 | "_model_name": "LayoutModel", 574 | "_view_count": null, 575 | "_view_module": "@jupyter-widgets/base", 576 | "_view_module_version": "1.2.0", 577 | "_view_name": "LayoutView", 578 | "align_content": null, 579 | "align_items": null, 580 | "align_self": null, 581 | "border": null, 582 | "bottom": null, 583 | "display": null, 584 | "flex": null, 585 | "flex_flow": null, 586 | "grid_area": null, 587 | "grid_auto_columns": null, 588 | "grid_auto_flow": null, 589 | "grid_auto_rows": null, 590 | "grid_column": null, 591 | "grid_gap": null, 592 | "grid_row": null, 593 | "grid_template_areas": null, 594 | "grid_template_columns": null, 595 | "grid_template_rows": null, 596 | "height": null, 597 | "justify_content": null, 598 | "justify_items": null, 599 | "left": null, 600 | "margin": null, 601 | "max_height": null, 602 | "max_width": null, 603 | "min_height": null, 604 | "min_width": null, 605 | "object_fit": null, 606 | "object_position": null, 607 | "order": null, 608 | "overflow": null, 609 | "overflow_x": null, 610 | "overflow_y": null, 611 | "padding": null, 612 | "right": null, 613 | "top": null, 614 | "visibility": null, 615 | "width": null 616 | } 617 | }, 618 | "73384a80fe6a49ce81b729857c863785": { 619 | "model_module": "@jupyter-widgets/controls", 620 | "model_name": "ProgressStyleModel", 621 | "model_module_version": "1.5.0", 622 | "state": { 623 | "_model_module": "@jupyter-widgets/controls", 624 | "_model_module_version": "1.5.0", 625 | "_model_name": "ProgressStyleModel", 626 | "_view_count": null, 627 | "_view_module": "@jupyter-widgets/base", 628 | "_view_module_version": "1.2.0", 629 | "_view_name": "StyleView", 630 | "bar_color": null, 631 | "description_width": "" 632 | } 633 | }, 634 | "7cbb103369024485a8512f8c85c7e845": { 635 | "model_module": "@jupyter-widgets/base", 636 | "model_name": "LayoutModel", 637 | "model_module_version": "1.2.0", 638 | "state": { 639 | "_model_module": "@jupyter-widgets/base", 640 | "_model_module_version": "1.2.0", 641 | "_model_name": "LayoutModel", 642 | "_view_count": null, 643 | "_view_module": "@jupyter-widgets/base", 644 | "_view_module_version": "1.2.0", 645 | "_view_name": "LayoutView", 646 | "align_content": null, 647 | "align_items": null, 648 | "align_self": null, 649 | "border": null, 650 | "bottom": null, 651 | "display": null, 652 | "flex": null, 653 | "flex_flow": null, 654 | "grid_area": null, 655 | "grid_auto_columns": null, 656 | "grid_auto_flow": null, 657 | "grid_auto_rows": null, 658 | "grid_column": null, 659 | "grid_gap": null, 660 | "grid_row": null, 661 | "grid_template_areas": null, 662 | "grid_template_columns": null, 663 | "grid_template_rows": null, 664 | "height": null, 665 | "justify_content": null, 666 | "justify_items": null, 667 | "left": null, 668 | "margin": null, 669 | "max_height": null, 670 | "max_width": null, 671 | "min_height": null, 672 | "min_width": null, 673 | "object_fit": null, 674 | "object_position": null, 675 | "order": null, 676 | "overflow": null, 677 | "overflow_x": null, 678 | "overflow_y": null, 679 | "padding": null, 680 | "right": null, 681 | "top": null, 682 | "visibility": null, 683 | "width": null 684 | } 685 | }, 686 | "0cd565d753564ee7bd5524e35ddc5c7a": { 687 | "model_module": "@jupyter-widgets/controls", 688 | "model_name": "DescriptionStyleModel", 689 | "model_module_version": "1.5.0", 690 | "state": { 691 | "_model_module": "@jupyter-widgets/controls", 692 | "_model_module_version": "1.5.0", 693 | "_model_name": "DescriptionStyleModel", 694 | "_view_count": null, 695 | "_view_module": "@jupyter-widgets/base", 696 | "_view_module_version": "1.2.0", 697 | "_view_name": "StyleView", 698 | "description_width": "" 699 | } 700 | }, 701 | "0e25ee177b264cb8a9d9c2c3b6bceb54": { 702 | "model_module": "@jupyter-widgets/controls", 703 | "model_name": "HBoxModel", 704 | "model_module_version": "1.5.0", 705 | "state": { 706 | "_dom_classes": [], 707 | "_model_module": "@jupyter-widgets/controls", 708 | "_model_module_version": "1.5.0", 709 | "_model_name": "HBoxModel", 710 | "_view_count": null, 711 | "_view_module": "@jupyter-widgets/controls", 712 | "_view_module_version": "1.5.0", 713 | "_view_name": "HBoxView", 714 | "box_style": "", 715 | "children": [ 716 | "IPY_MODEL_0aff245fb0e7493fa43bda3a26fd0b7a", 717 | "IPY_MODEL_81cdc5f0b238441b8ab4aaba2d13747c", 718 | "IPY_MODEL_fe12a80a3c214241a09e517c261fa403" 719 | ], 720 | "layout": "IPY_MODEL_467fdeed23ec4d7e93128b23f264b69f" 721 | } 722 | }, 723 | "0aff245fb0e7493fa43bda3a26fd0b7a": { 724 | "model_module": "@jupyter-widgets/controls", 725 | "model_name": "HTMLModel", 726 | "model_module_version": "1.5.0", 727 | "state": { 728 | "_dom_classes": [], 729 | "_model_module": "@jupyter-widgets/controls", 730 | "_model_module_version": "1.5.0", 731 | "_model_name": "HTMLModel", 732 | "_view_count": null, 733 | "_view_module": "@jupyter-widgets/controls", 734 | "_view_module_version": "1.5.0", 735 | "_view_name": "HTMLView", 736 | "description": "", 737 | "description_tooltip": null, 738 | "layout": "IPY_MODEL_578cbcd985654c8c929f093111c2b2d1", 739 | "placeholder": "​", 740 | "style": "IPY_MODEL_d4d2e7d5d12a41f2ad2e5e3721d6eca6", 741 | "value": "Parsing documents into nodes: 100%" 742 | } 743 | }, 744 | "81cdc5f0b238441b8ab4aaba2d13747c": { 745 | "model_module": "@jupyter-widgets/controls", 746 | "model_name": "FloatProgressModel", 747 | "model_module_version": "1.5.0", 748 | "state": { 749 | "_dom_classes": [], 750 | "_model_module": "@jupyter-widgets/controls", 751 | "_model_module_version": "1.5.0", 752 | "_model_name": "FloatProgressModel", 753 | "_view_count": null, 754 | "_view_module": "@jupyter-widgets/controls", 755 | "_view_module_version": "1.5.0", 756 | "_view_name": "ProgressView", 757 | "bar_style": "success", 758 | "description": "", 759 | "description_tooltip": null, 760 | "layout": "IPY_MODEL_38605ca9f0a141ae89a45f7eabb53538", 761 | "max": 25, 762 | "min": 0, 763 | "orientation": "horizontal", 764 | "style": "IPY_MODEL_dfa72cda3d014b929697946dcdf42ba3", 765 | "value": 25 766 | } 767 | }, 768 | "fe12a80a3c214241a09e517c261fa403": { 769 | "model_module": "@jupyter-widgets/controls", 770 | "model_name": "HTMLModel", 771 | "model_module_version": "1.5.0", 772 | "state": { 773 | "_dom_classes": [], 774 | "_model_module": "@jupyter-widgets/controls", 775 | "_model_module_version": "1.5.0", 776 | "_model_name": "HTMLModel", 777 | "_view_count": null, 778 | "_view_module": "@jupyter-widgets/controls", 779 | "_view_module_version": "1.5.0", 780 | "_view_name": "HTMLView", 781 | "description": "", 782 | "description_tooltip": null, 783 | "layout": "IPY_MODEL_0beb548fdf264428a249009572a7208d", 784 | "placeholder": "​", 785 | "style": "IPY_MODEL_af0c7684497140e1bb3a0d6a32b5b100", 786 | "value": " 25/25 [00:00<00:00, 17.53it/s]" 787 | } 788 | }, 789 | "467fdeed23ec4d7e93128b23f264b69f": { 790 | "model_module": "@jupyter-widgets/base", 791 | "model_name": "LayoutModel", 792 | "model_module_version": "1.2.0", 793 | "state": { 794 | "_model_module": "@jupyter-widgets/base", 795 | "_model_module_version": "1.2.0", 796 | "_model_name": "LayoutModel", 797 | "_view_count": null, 798 | "_view_module": "@jupyter-widgets/base", 799 | "_view_module_version": "1.2.0", 800 | "_view_name": "LayoutView", 801 | "align_content": null, 802 | "align_items": null, 803 | "align_self": null, 804 | "border": null, 805 | "bottom": null, 806 | "display": null, 807 | "flex": null, 808 | "flex_flow": null, 809 | "grid_area": null, 810 | "grid_auto_columns": null, 811 | "grid_auto_flow": null, 812 | "grid_auto_rows": null, 813 | "grid_column": null, 814 | "grid_gap": null, 815 | "grid_row": null, 816 | "grid_template_areas": null, 817 | "grid_template_columns": null, 818 | "grid_template_rows": null, 819 | "height": null, 820 | "justify_content": null, 821 | "justify_items": null, 822 | "left": null, 823 | "margin": null, 824 | "max_height": null, 825 | "max_width": null, 826 | "min_height": null, 827 | "min_width": null, 828 | "object_fit": null, 829 | "object_position": null, 830 | "order": null, 831 | "overflow": null, 832 | "overflow_x": null, 833 | "overflow_y": null, 834 | "padding": null, 835 | "right": null, 836 | "top": null, 837 | "visibility": null, 838 | "width": null 839 | } 840 | }, 841 | "578cbcd985654c8c929f093111c2b2d1": { 842 | "model_module": "@jupyter-widgets/base", 843 | "model_name": "LayoutModel", 844 | "model_module_version": "1.2.0", 845 | "state": { 846 | "_model_module": "@jupyter-widgets/base", 847 | "_model_module_version": "1.2.0", 848 | "_model_name": "LayoutModel", 849 | "_view_count": null, 850 | "_view_module": "@jupyter-widgets/base", 851 | "_view_module_version": "1.2.0", 852 | "_view_name": "LayoutView", 853 | "align_content": null, 854 | "align_items": null, 855 | "align_self": null, 856 | "border": null, 857 | "bottom": null, 858 | "display": null, 859 | "flex": null, 860 | "flex_flow": null, 861 | "grid_area": null, 862 | "grid_auto_columns": null, 863 | "grid_auto_flow": null, 864 | "grid_auto_rows": null, 865 | "grid_column": null, 866 | "grid_gap": null, 867 | "grid_row": null, 868 | "grid_template_areas": null, 869 | "grid_template_columns": null, 870 | "grid_template_rows": null, 871 | "height": null, 872 | "justify_content": null, 873 | "justify_items": null, 874 | "left": null, 875 | "margin": null, 876 | "max_height": null, 877 | "max_width": null, 878 | "min_height": null, 879 | "min_width": null, 880 | "object_fit": null, 881 | "object_position": null, 882 | "order": null, 883 | "overflow": null, 884 | "overflow_x": null, 885 | "overflow_y": null, 886 | "padding": null, 887 | "right": null, 888 | "top": null, 889 | "visibility": null, 890 | "width": null 891 | } 892 | }, 893 | "d4d2e7d5d12a41f2ad2e5e3721d6eca6": { 894 | "model_module": "@jupyter-widgets/controls", 895 | "model_name": "DescriptionStyleModel", 896 | "model_module_version": "1.5.0", 897 | "state": { 898 | "_model_module": "@jupyter-widgets/controls", 899 | "_model_module_version": "1.5.0", 900 | "_model_name": "DescriptionStyleModel", 901 | "_view_count": null, 902 | "_view_module": "@jupyter-widgets/base", 903 | "_view_module_version": "1.2.0", 904 | "_view_name": "StyleView", 905 | "description_width": "" 906 | } 907 | }, 908 | "38605ca9f0a141ae89a45f7eabb53538": { 909 | "model_module": "@jupyter-widgets/base", 910 | "model_name": "LayoutModel", 911 | "model_module_version": "1.2.0", 912 | "state": { 913 | "_model_module": "@jupyter-widgets/base", 914 | "_model_module_version": "1.2.0", 915 | "_model_name": "LayoutModel", 916 | "_view_count": null, 917 | "_view_module": "@jupyter-widgets/base", 918 | "_view_module_version": "1.2.0", 919 | "_view_name": "LayoutView", 920 | "align_content": null, 921 | "align_items": null, 922 | "align_self": null, 923 | "border": null, 924 | "bottom": null, 925 | "display": null, 926 | "flex": null, 927 | "flex_flow": null, 928 | "grid_area": null, 929 | "grid_auto_columns": null, 930 | "grid_auto_flow": null, 931 | "grid_auto_rows": null, 932 | "grid_column": null, 933 | "grid_gap": null, 934 | "grid_row": null, 935 | "grid_template_areas": null, 936 | "grid_template_columns": null, 937 | "grid_template_rows": null, 938 | "height": null, 939 | "justify_content": null, 940 | "justify_items": null, 941 | "left": null, 942 | "margin": null, 943 | "max_height": null, 944 | "max_width": null, 945 | "min_height": null, 946 | "min_width": null, 947 | "object_fit": null, 948 | "object_position": null, 949 | "order": null, 950 | "overflow": null, 951 | "overflow_x": null, 952 | "overflow_y": null, 953 | "padding": null, 954 | "right": null, 955 | "top": null, 956 | "visibility": null, 957 | "width": null 958 | } 959 | }, 960 | "dfa72cda3d014b929697946dcdf42ba3": { 961 | "model_module": "@jupyter-widgets/controls", 962 | "model_name": "ProgressStyleModel", 963 | "model_module_version": "1.5.0", 964 | "state": { 965 | "_model_module": "@jupyter-widgets/controls", 966 | "_model_module_version": "1.5.0", 967 | "_model_name": "ProgressStyleModel", 968 | "_view_count": null, 969 | "_view_module": "@jupyter-widgets/base", 970 | "_view_module_version": "1.2.0", 971 | "_view_name": "StyleView", 972 | "bar_color": null, 973 | "description_width": "" 974 | } 975 | }, 976 | "0beb548fdf264428a249009572a7208d": { 977 | "model_module": "@jupyter-widgets/base", 978 | "model_name": "LayoutModel", 979 | "model_module_version": "1.2.0", 980 | "state": { 981 | "_model_module": "@jupyter-widgets/base", 982 | "_model_module_version": "1.2.0", 983 | "_model_name": "LayoutModel", 984 | "_view_count": null, 985 | "_view_module": "@jupyter-widgets/base", 986 | "_view_module_version": "1.2.0", 987 | "_view_name": "LayoutView", 988 | "align_content": null, 989 | "align_items": null, 990 | "align_self": null, 991 | "border": null, 992 | "bottom": null, 993 | "display": null, 994 | "flex": null, 995 | "flex_flow": null, 996 | "grid_area": null, 997 | "grid_auto_columns": null, 998 | "grid_auto_flow": null, 999 | "grid_auto_rows": null, 1000 | "grid_column": null, 1001 | "grid_gap": null, 1002 | "grid_row": null, 1003 | "grid_template_areas": null, 1004 | "grid_template_columns": null, 1005 | "grid_template_rows": null, 1006 | "height": null, 1007 | "justify_content": null, 1008 | "justify_items": null, 1009 | "left": null, 1010 | "margin": null, 1011 | "max_height": null, 1012 | "max_width": null, 1013 | "min_height": null, 1014 | "min_width": null, 1015 | "object_fit": null, 1016 | "object_position": null, 1017 | "order": null, 1018 | "overflow": null, 1019 | "overflow_x": null, 1020 | "overflow_y": null, 1021 | "padding": null, 1022 | "right": null, 1023 | "top": null, 1024 | "visibility": null, 1025 | "width": null 1026 | } 1027 | }, 1028 | "af0c7684497140e1bb3a0d6a32b5b100": { 1029 | "model_module": "@jupyter-widgets/controls", 1030 | "model_name": "DescriptionStyleModel", 1031 | "model_module_version": "1.5.0", 1032 | "state": { 1033 | "_model_module": "@jupyter-widgets/controls", 1034 | "_model_module_version": "1.5.0", 1035 | "_model_name": "DescriptionStyleModel", 1036 | "_view_count": null, 1037 | "_view_module": "@jupyter-widgets/base", 1038 | "_view_module_version": "1.2.0", 1039 | "_view_name": "StyleView", 1040 | "description_width": "" 1041 | } 1042 | }, 1043 | "acc621fc589d4a5993da140d60580a71": { 1044 | "model_module": "@jupyter-widgets/controls", 1045 | "model_name": "HBoxModel", 1046 | "model_module_version": "1.5.0", 1047 | "state": { 1048 | "_dom_classes": [], 1049 | "_model_module": "@jupyter-widgets/controls", 1050 | "_model_module_version": "1.5.0", 1051 | "_model_name": "HBoxModel", 1052 | "_view_count": null, 1053 | "_view_module": "@jupyter-widgets/controls", 1054 | "_view_module_version": "1.5.0", 1055 | "_view_name": "HBoxView", 1056 | "box_style": "", 1057 | "children": [ 1058 | "IPY_MODEL_135f007d5d8a4c859bb91a36e4e5839d", 1059 | "IPY_MODEL_771385e36da6413aad4298d2f98a8ccd", 1060 | "IPY_MODEL_c962990cf0f641b796cc049d0182c9a7" 1061 | ], 1062 | "layout": "IPY_MODEL_dcf7375f4edc4527beaf72385e943a54" 1063 | } 1064 | }, 1065 | "135f007d5d8a4c859bb91a36e4e5839d": { 1066 | "model_module": "@jupyter-widgets/controls", 1067 | "model_name": "HTMLModel", 1068 | "model_module_version": "1.5.0", 1069 | "state": { 1070 | "_dom_classes": [], 1071 | "_model_module": "@jupyter-widgets/controls", 1072 | "_model_module_version": "1.5.0", 1073 | "_model_name": "HTMLModel", 1074 | "_view_count": null, 1075 | "_view_module": "@jupyter-widgets/controls", 1076 | "_view_module_version": "1.5.0", 1077 | "_view_name": "HTMLView", 1078 | "description": "", 1079 | "description_tooltip": null, 1080 | "layout": "IPY_MODEL_656eec703cdf493f83421a24aac08c0f", 1081 | "placeholder": "​", 1082 | "style": "IPY_MODEL_0cdeb960101b4b3f80bb91d0305f141f", 1083 | "value": "Generating embeddings: 100%" 1084 | } 1085 | }, 1086 | "771385e36da6413aad4298d2f98a8ccd": { 1087 | "model_module": "@jupyter-widgets/controls", 1088 | "model_name": "FloatProgressModel", 1089 | "model_module_version": "1.5.0", 1090 | "state": { 1091 | "_dom_classes": [], 1092 | "_model_module": "@jupyter-widgets/controls", 1093 | "_model_module_version": "1.5.0", 1094 | "_model_name": "FloatProgressModel", 1095 | "_view_count": null, 1096 | "_view_module": "@jupyter-widgets/controls", 1097 | "_view_module_version": "1.5.0", 1098 | "_view_name": "ProgressView", 1099 | "bar_style": "success", 1100 | "description": "", 1101 | "description_tooltip": null, 1102 | "layout": "IPY_MODEL_6d36fa31708f4621ab12b1a992ed4e03", 1103 | "max": 49, 1104 | "min": 0, 1105 | "orientation": "horizontal", 1106 | "style": "IPY_MODEL_0ec3002d622942d3927cb0510709ee6a", 1107 | "value": 49 1108 | } 1109 | }, 1110 | "c962990cf0f641b796cc049d0182c9a7": { 1111 | "model_module": "@jupyter-widgets/controls", 1112 | "model_name": "HTMLModel", 1113 | "model_module_version": "1.5.0", 1114 | "state": { 1115 | "_dom_classes": [], 1116 | "_model_module": "@jupyter-widgets/controls", 1117 | "_model_module_version": "1.5.0", 1118 | "_model_name": "HTMLModel", 1119 | "_view_count": null, 1120 | "_view_module": "@jupyter-widgets/controls", 1121 | "_view_module_version": "1.5.0", 1122 | "_view_name": "HTMLView", 1123 | "description": "", 1124 | "description_tooltip": null, 1125 | "layout": "IPY_MODEL_fff01343da8e4ee0998a30a2196a5d3f", 1126 | "placeholder": "​", 1127 | "style": "IPY_MODEL_25b17447cfc74a03824a9e3eb409597e", 1128 | "value": " 49/49 [00:01<00:00, 29.81it/s]" 1129 | } 1130 | }, 1131 | "dcf7375f4edc4527beaf72385e943a54": { 1132 | "model_module": "@jupyter-widgets/base", 1133 | "model_name": "LayoutModel", 1134 | "model_module_version": "1.2.0", 1135 | "state": { 1136 | "_model_module": "@jupyter-widgets/base", 1137 | "_model_module_version": "1.2.0", 1138 | "_model_name": "LayoutModel", 1139 | "_view_count": null, 1140 | "_view_module": "@jupyter-widgets/base", 1141 | "_view_module_version": "1.2.0", 1142 | "_view_name": "LayoutView", 1143 | "align_content": null, 1144 | "align_items": null, 1145 | "align_self": null, 1146 | "border": null, 1147 | "bottom": null, 1148 | "display": null, 1149 | "flex": null, 1150 | "flex_flow": null, 1151 | "grid_area": null, 1152 | "grid_auto_columns": null, 1153 | "grid_auto_flow": null, 1154 | "grid_auto_rows": null, 1155 | "grid_column": null, 1156 | "grid_gap": null, 1157 | "grid_row": null, 1158 | "grid_template_areas": null, 1159 | "grid_template_columns": null, 1160 | "grid_template_rows": null, 1161 | "height": null, 1162 | "justify_content": null, 1163 | "justify_items": null, 1164 | "left": null, 1165 | "margin": null, 1166 | "max_height": null, 1167 | "max_width": null, 1168 | "min_height": null, 1169 | "min_width": null, 1170 | "object_fit": null, 1171 | "object_position": null, 1172 | "order": null, 1173 | "overflow": null, 1174 | "overflow_x": null, 1175 | "overflow_y": null, 1176 | "padding": null, 1177 | "right": null, 1178 | "top": null, 1179 | "visibility": null, 1180 | "width": null 1181 | } 1182 | }, 1183 | "656eec703cdf493f83421a24aac08c0f": { 1184 | "model_module": "@jupyter-widgets/base", 1185 | "model_name": "LayoutModel", 1186 | "model_module_version": "1.2.0", 1187 | "state": { 1188 | "_model_module": "@jupyter-widgets/base", 1189 | "_model_module_version": "1.2.0", 1190 | "_model_name": "LayoutModel", 1191 | "_view_count": null, 1192 | "_view_module": "@jupyter-widgets/base", 1193 | "_view_module_version": "1.2.0", 1194 | "_view_name": "LayoutView", 1195 | "align_content": null, 1196 | "align_items": null, 1197 | "align_self": null, 1198 | "border": null, 1199 | "bottom": null, 1200 | "display": null, 1201 | "flex": null, 1202 | "flex_flow": null, 1203 | "grid_area": null, 1204 | "grid_auto_columns": null, 1205 | "grid_auto_flow": null, 1206 | "grid_auto_rows": null, 1207 | "grid_column": null, 1208 | "grid_gap": null, 1209 | "grid_row": null, 1210 | "grid_template_areas": null, 1211 | "grid_template_columns": null, 1212 | "grid_template_rows": null, 1213 | "height": null, 1214 | "justify_content": null, 1215 | "justify_items": null, 1216 | "left": null, 1217 | "margin": null, 1218 | "max_height": null, 1219 | "max_width": null, 1220 | "min_height": null, 1221 | "min_width": null, 1222 | "object_fit": null, 1223 | "object_position": null, 1224 | "order": null, 1225 | "overflow": null, 1226 | "overflow_x": null, 1227 | "overflow_y": null, 1228 | "padding": null, 1229 | "right": null, 1230 | "top": null, 1231 | "visibility": null, 1232 | "width": null 1233 | } 1234 | }, 1235 | "0cdeb960101b4b3f80bb91d0305f141f": { 1236 | "model_module": "@jupyter-widgets/controls", 1237 | "model_name": "DescriptionStyleModel", 1238 | "model_module_version": "1.5.0", 1239 | "state": { 1240 | "_model_module": "@jupyter-widgets/controls", 1241 | "_model_module_version": "1.5.0", 1242 | "_model_name": "DescriptionStyleModel", 1243 | "_view_count": null, 1244 | "_view_module": "@jupyter-widgets/base", 1245 | "_view_module_version": "1.2.0", 1246 | "_view_name": "StyleView", 1247 | "description_width": "" 1248 | } 1249 | }, 1250 | "6d36fa31708f4621ab12b1a992ed4e03": { 1251 | "model_module": "@jupyter-widgets/base", 1252 | "model_name": "LayoutModel", 1253 | "model_module_version": "1.2.0", 1254 | "state": { 1255 | "_model_module": "@jupyter-widgets/base", 1256 | "_model_module_version": "1.2.0", 1257 | "_model_name": "LayoutModel", 1258 | "_view_count": null, 1259 | "_view_module": "@jupyter-widgets/base", 1260 | "_view_module_version": "1.2.0", 1261 | "_view_name": "LayoutView", 1262 | "align_content": null, 1263 | "align_items": null, 1264 | "align_self": null, 1265 | "border": null, 1266 | "bottom": null, 1267 | "display": null, 1268 | "flex": null, 1269 | "flex_flow": null, 1270 | "grid_area": null, 1271 | "grid_auto_columns": null, 1272 | "grid_auto_flow": null, 1273 | "grid_auto_rows": null, 1274 | "grid_column": null, 1275 | "grid_gap": null, 1276 | "grid_row": null, 1277 | "grid_template_areas": null, 1278 | "grid_template_columns": null, 1279 | "grid_template_rows": null, 1280 | "height": null, 1281 | "justify_content": null, 1282 | "justify_items": null, 1283 | "left": null, 1284 | "margin": null, 1285 | "max_height": null, 1286 | "max_width": null, 1287 | "min_height": null, 1288 | "min_width": null, 1289 | "object_fit": null, 1290 | "object_position": null, 1291 | "order": null, 1292 | "overflow": null, 1293 | "overflow_x": null, 1294 | "overflow_y": null, 1295 | "padding": null, 1296 | "right": null, 1297 | "top": null, 1298 | "visibility": null, 1299 | "width": null 1300 | } 1301 | }, 1302 | "0ec3002d622942d3927cb0510709ee6a": { 1303 | "model_module": "@jupyter-widgets/controls", 1304 | "model_name": "ProgressStyleModel", 1305 | "model_module_version": "1.5.0", 1306 | "state": { 1307 | "_model_module": "@jupyter-widgets/controls", 1308 | "_model_module_version": "1.5.0", 1309 | "_model_name": "ProgressStyleModel", 1310 | "_view_count": null, 1311 | "_view_module": "@jupyter-widgets/base", 1312 | "_view_module_version": "1.2.0", 1313 | "_view_name": "StyleView", 1314 | "bar_color": null, 1315 | "description_width": "" 1316 | } 1317 | }, 1318 | "fff01343da8e4ee0998a30a2196a5d3f": { 1319 | "model_module": "@jupyter-widgets/base", 1320 | "model_name": "LayoutModel", 1321 | "model_module_version": "1.2.0", 1322 | "state": { 1323 | "_model_module": "@jupyter-widgets/base", 1324 | "_model_module_version": "1.2.0", 1325 | "_model_name": "LayoutModel", 1326 | "_view_count": null, 1327 | "_view_module": "@jupyter-widgets/base", 1328 | "_view_module_version": "1.2.0", 1329 | "_view_name": "LayoutView", 1330 | "align_content": null, 1331 | "align_items": null, 1332 | "align_self": null, 1333 | "border": null, 1334 | "bottom": null, 1335 | "display": null, 1336 | "flex": null, 1337 | "flex_flow": null, 1338 | "grid_area": null, 1339 | "grid_auto_columns": null, 1340 | "grid_auto_flow": null, 1341 | "grid_auto_rows": null, 1342 | "grid_column": null, 1343 | "grid_gap": null, 1344 | "grid_row": null, 1345 | "grid_template_areas": null, 1346 | "grid_template_columns": null, 1347 | "grid_template_rows": null, 1348 | "height": null, 1349 | "justify_content": null, 1350 | "justify_items": null, 1351 | "left": null, 1352 | "margin": null, 1353 | "max_height": null, 1354 | "max_width": null, 1355 | "min_height": null, 1356 | "min_width": null, 1357 | "object_fit": null, 1358 | "object_position": null, 1359 | "order": null, 1360 | "overflow": null, 1361 | "overflow_x": null, 1362 | "overflow_y": null, 1363 | "padding": null, 1364 | "right": null, 1365 | "top": null, 1366 | "visibility": null, 1367 | "width": null 1368 | } 1369 | }, 1370 | "25b17447cfc74a03824a9e3eb409597e": { 1371 | "model_module": "@jupyter-widgets/controls", 1372 | "model_name": "DescriptionStyleModel", 1373 | "model_module_version": "1.5.0", 1374 | "state": { 1375 | "_model_module": "@jupyter-widgets/controls", 1376 | "_model_module_version": "1.5.0", 1377 | "_model_name": "DescriptionStyleModel", 1378 | "_view_count": null, 1379 | "_view_module": "@jupyter-widgets/base", 1380 | "_view_module_version": "1.2.0", 1381 | "_view_name": "StyleView", 1382 | "description_width": "" 1383 | } 1384 | } 1385 | } 1386 | } 1387 | }, 1388 | "cells": [ 1389 | { 1390 | "cell_type": "code", 1391 | "execution_count": 1, 1392 | "metadata": { 1393 | "colab": { 1394 | "base_uri": "https://localhost:8080/" 1395 | }, 1396 | "id": "iRtaqJh-5ujb", 1397 | "outputId": "2a4657b6-0291-4bbd-fc38-25435e60b232" 1398 | }, 1399 | "outputs": [ 1400 | { 1401 | "output_type": "stream", 1402 | "name": "stdout", 1403 | "text": [ 1404 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m25.3/25.3 MB\u001b[0m \u001b[31m37.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1405 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m190.6/190.6 kB\u001b[0m \u001b[31m15.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1406 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m256.7/256.7 kB\u001b[0m \u001b[31m22.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1407 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m795.5/795.5 kB\u001b[0m \u001b[31m41.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1408 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.4/1.4 MB\u001b[0m \u001b[31m51.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1409 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.5/59.5 kB\u001b[0m \u001b[31m5.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1410 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.9/92.9 kB\u001b[0m \u001b[31m9.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1411 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.7/75.7 kB\u001b[0m \u001b[31m8.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1412 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.4/60.4 kB\u001b[0m \u001b[31m6.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1413 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.3/21.3 MB\u001b[0m \u001b[31m53.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1414 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.0/77.0 kB\u001b[0m \u001b[31m10.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1415 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m75.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1416 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.8/3.8 MB\u001b[0m \u001b[31m92.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1417 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m74.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1418 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m143.8/143.8 kB\u001b[0m \u001b[31m16.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1419 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m38.0/38.0 MB\u001b[0m \u001b[31m17.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1420 | "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", 1421 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m302.7/302.7 kB\u001b[0m \u001b[31m29.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1422 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m302.0/302.0 kB\u001b[0m \u001b[31m29.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1423 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m138.7/138.7 kB\u001b[0m \u001b[31m15.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1424 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m395.8/395.8 kB\u001b[0m \u001b[31m33.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1425 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1426 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m13.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1427 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.7/62.7 kB\u001b[0m \u001b[31m6.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1428 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m48.0/48.0 kB\u001b[0m \u001b[31m5.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1429 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m38.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1430 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1431 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m7.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1432 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.0/76.0 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1433 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.4/49.4 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1434 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m44.4/44.4 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1435 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m98.7/98.7 kB\u001b[0m \u001b[31m13.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1436 | "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m295.0/295.0 kB\u001b[0m \u001b[31m31.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", 1437 | "\u001b[?25h Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n", 1438 | "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", 1439 | "lida 0.0.10 requires kaleido, which is not installed.\n", 1440 | "llmx 0.0.15a0 requires cohere, which is not installed.\n", 1441 | "ibis-framework 6.2.0 requires pyarrow<13,>=2, but you have pyarrow 14.0.0 which is incompatible.\n", 1442 | "pandas-gbq 0.17.9 requires pyarrow<10.0dev,>=3.0.0, but you have pyarrow 14.0.0 which is incompatible.\n", 1443 | "tensorflow-probability 0.22.0 requires typing-extensions<4.6.0, but you have typing-extensions 4.8.0 which is incompatible.\u001b[0m\u001b[31m\n", 1444 | "\u001b[0m" 1445 | ] 1446 | } 1447 | ], 1448 | "source": [ 1449 | "!pip install autollm gradio gitpython nbconvert -Uqq" 1450 | ] 1451 | }, 1452 | { 1453 | "cell_type": "code", 1454 | "source": [ 1455 | "from autollm import AutoQueryEngine\n", 1456 | "from autollm.utils.document_reading import read_github_repo_as_documents, read_files_as_documents\n", 1457 | "import os\n", 1458 | "import gradio as gr" 1459 | ], 1460 | "metadata": { 1461 | "id": "44a6Za4n8hUV" 1462 | }, 1463 | "execution_count": 2, 1464 | "outputs": [] 1465 | }, 1466 | { 1467 | "cell_type": "code", 1468 | "source": [ 1469 | "os.environ[\"OPENAI_API_KEY\"] = \"\"" 1470 | ], 1471 | "metadata": { 1472 | "id": "Dv1tDybO9Cv0" 1473 | }, 1474 | "execution_count": 3, 1475 | "outputs": [] 1476 | }, 1477 | { 1478 | "cell_type": "markdown", 1479 | "source": [ 1480 | "## Read files as documents" 1481 | ], 1482 | "metadata": { 1483 | "id": "9tdLJzGQ9LtZ" 1484 | } 1485 | }, 1486 | { 1487 | "cell_type": "code", 1488 | "source": [ 1489 | "git_repo_url = \"https://github.com/langchain-ai/langchain.git\"\n", 1490 | "required_exts = [\".md\"]" 1491 | ], 1492 | "metadata": { 1493 | "id": "G92IBco_9EP9" 1494 | }, 1495 | "execution_count": 5, 1496 | "outputs": [] 1497 | }, 1498 | { 1499 | "cell_type": "code", 1500 | "source": [ 1501 | "documents = read_github_repo_as_documents(git_repo_url=git_repo_url, relative_folder_path=\"docs\", required_exts=required_exts)" 1502 | ], 1503 | "metadata": { 1504 | "colab": { 1505 | "base_uri": "https://localhost:8080/" 1506 | }, 1507 | "id": "n1pO14uv9ESS", 1508 | "outputId": "bf883bf7-ce9d-43ca-dd04-5a73abde14dc" 1509 | }, 1510 | "execution_count": 6, 1511 | "outputs": [ 1512 | { 1513 | "output_type": "stream", 1514 | "name": "stdout", 1515 | "text": [ 1516 | "Temporary directory created at autollm/temp\n" 1517 | ] 1518 | } 1519 | ] 1520 | }, 1521 | { 1522 | "cell_type": "markdown", 1523 | "source": [ 1524 | "## AutoQueryEngine" 1525 | ], 1526 | "metadata": { 1527 | "id": "NupqNIw293N5" 1528 | } 1529 | }, 1530 | { 1531 | "cell_type": "code", 1532 | "source": [ 1533 | "query_engine = AutoQueryEngine.from_parameters(documents=documents)" 1534 | ], 1535 | "metadata": { 1536 | "colab": { 1537 | "base_uri": "https://localhost:8080/", 1538 | "height": 203, 1539 | "referenced_widgets": [ 1540 | "ac27341a2f4f4005be42e10cec9b2b0d", 1541 | "89af4988cc99475faea8f2149d51abc3", 1542 | "17d35b4db6fb4c69bf4a90cc60345e8a", 1543 | "2e959d52c5664dc584c437706b8a2dfc", 1544 | "b8afa23b8f96413b91e03fe4f01ac5c8", 1545 | "6d225c2d3af2498ba7cf5c94aa27acb2", 1546 | "95566beafa5a4529b04db1a8f9b53377", 1547 | "600b330557564905b68cd4b662f12c4c", 1548 | "e76bcdd7bafb4c6f99c5e1b078c2557c", 1549 | "b4ebfef2b7884089bed47480e3822d41", 1550 | "e58a11f1d04b45a69d73a08a935443f7", 1551 | "c41e70c75d684a538e1b04d237e74f19", 1552 | "0bd7c25c97874f32b941edd041d44609", 1553 | "010f0f99fda2469bb06f2dc989b7a086", 1554 | "d9228eaec40d457a980f70f10b7d7b2e", 1555 | "82e471ddb36648ed8701fa4a71685e40", 1556 | "e9170080bfc5443dbbf706f4b15cf28d", 1557 | "15c46b91f028457eb9701d15ceccf4b5", 1558 | "b13a628ede3c413e912e54ec5b52363f", 1559 | "73384a80fe6a49ce81b729857c863785", 1560 | "7cbb103369024485a8512f8c85c7e845", 1561 | "0cd565d753564ee7bd5524e35ddc5c7a" 1562 | ] 1563 | }, 1564 | "id": "LXdLwFrJ9EVx", 1565 | "outputId": "167e0efc-0799-4fc2-fa3f-6a093d27548a" 1566 | }, 1567 | "execution_count": 7, 1568 | "outputs": [ 1569 | { 1570 | "output_type": "stream", 1571 | "name": "stderr", 1572 | "text": [ 1573 | "[nltk_data] Downloading package punkt to /tmp/llama_index...\n", 1574 | "[nltk_data] Unzipping tokenizers/punkt.zip.\n" 1575 | ] 1576 | }, 1577 | { 1578 | "output_type": "display_data", 1579 | "data": { 1580 | "text/plain": [ 1581 | "Parsing documents into nodes: 0%| | 0/25 [00:00: RelatedNodeInfo(node_id='autollm/temp/docs/docs/community.md_part_0', node_type=None, metadata={}, hash=None)}, hash='66335aa3890a0c8b612ca51b121244a631ab3d1cdefef16739479244c6f6b774', text='# Community navigator\\n\\nHi! Thanks for being here. We’re lucky to have a community of so many passionate developers building with LangChain–we have so much to teach and learn from each other. Community members contribute code, host meetups, write blog posts, amplify each other’s work, become each other\\'s customers and collaborators, and so much more.\\n\\nWhether you’re new to LangChain, looking to go deeper, or just want to get more exposure to the world of building with LLMs, this page can point you in the right direction. \\n\\n- **🦜 Contribute to LangChain**\\n\\n- **🌍\\xa0Meetups, Events, and Hackathons**\\n\\n- **📣 Help Us Amplify Your Work**\\n\\n- **💬 Stay in the loop**\\n\\n\\n# 🦜 Contribute to LangChain\\n\\nLangChain is the product of over 5,000+ contributions by 1,500+ contributors, and there is ******still****** so much to do together. Here are some ways to get involved:\\n\\n- **Open a pull request:** We’d appreciate all forms of contributions–new features, infrastructure improvements, better documentation, bug fixes, etc. If you have an improvement or an idea, we’d love to work on it with you.\\n- **Read our contributor guidelines:** We ask contributors to follow a\\xa0\"fork and pull request\"\\xa0workflow, run a few local checks for formatting, linting, and testing before submitting, and follow certain documentation and testing conventions.\\n - **First time contributor?** Try one of these PRs with the “good first issue” tag.\\n- **Become an expert:** Our experts help the community by answering product questions in Discord. If that’s a role you’d like to play, we’d be so grateful! (And we have some special experts-only goodies/perks we can tell you more about). Send us an email to introduce yourself at hello@langchain.dev and we’ll take it from there!\\n- **Integrate with LangChain:** If your product integrates with LangChain–or aspires to–we want to help make sure the experience is as smooth as possible for you and end users. Send us an email at hello@langchain.dev and tell us what you’re working on.\\n - **Become an Integration Maintainer:** Partner with our team to ensure your integration stays up-to-date and talk directly with users (and answer their inquiries) in our Discord. Introduce yourself at hello@langchain.dev if you’d like to explore this role.', start_char_idx=None, end_char_idx=None, text_template='{metadata_str}\\n\\n{content}', metadata_template='{key}: {value}', metadata_seperator='\\n'), score=0.6834521293640137), NodeWithScore(node=TextNode(id_='56d2c06c-5b9c-47d3-b706-c361f2c31bdd', embedding=None, metadata={}, excluded_embed_metadata_keys=[], excluded_llm_metadata_keys=[], relationships={: RelatedNodeInfo(node_id='autollm/temp/docs/docs/community.md_part_0', node_type=None, metadata={}, hash=None)}, hash='429f8a79bcf8e7f747b9aa00c307ec09a32dd9b79da4b8e771c5e5057ac7c305', text='# 🌍 Meetups, Events, and Hackathons\\n\\nOne of our favorite things about working in AI is how much enthusiasm there is for building together. We want to help make that as easy and impactful for you as possible! \\n- **Find a meetup, hackathon, or webinar:** You can find the one for you on our global events calendar. \\n - **Submit an event to our calendar:** Email us at events@langchain.dev with a link to your event page! We can also help you spread the word with our local communities.\\n- **Host a meetup:** If you want to bring a group of builders together, we want to help! We can publicize your event on our event calendar/Twitter, share it with our local communities in Discord, send swag, or potentially hook you up with a sponsor. Email us at events@langchain.dev to tell us about your event!\\n- **Become a meetup sponsor:** We often hear from groups of builders that want to get together, but are blocked or limited on some dimension (space to host, budget for snacks, prizes to distribute, etc.). If you’d like to help, send us an email to events@langchain.dev we can share more about how it works!\\n- **Speak at an event:** Meetup hosts are always looking for great speakers, presenters, and panelists. If you’d like to do that at an event, send us an email to hello@langchain.dev with more information about yourself, what you want to talk about, and what city you’re based in and we’ll try to match you with an upcoming event!\\n- **Tell us about your LLM community:** If you host or participate in a community that would welcome support from LangChain and/or our team, send us an email at hello@langchain.dev and let us know how we can help.\\n\\n# 📣\\xa0Help Us Amplify Your Work\\n\\nIf you’re working on something you’re proud of, and think the LangChain community would benefit from knowing about it, we want to help you show it off.\\n\\n- **Post about your work and mention us:** We love hanging out on Twitter to see what people in the space are talking about and working on. If you tag @langchainai, we’ll almost certainly see it and can show you some love.\\n- **Publish something on our blog:** If you’re writing about your experience building with LangChain, we’d love to post (or crosspost) it on our blog! E-mail hello@langchain.dev with a draft of your post! Or even an idea for something you want to write about.\\n- **Get your product onto our integrations hub:** Many developers take advantage of our seamless integrations with other products, and come to our integrations hub to find out who those are. If you want to get your product up there, tell us about it (and how it works with LangChain) at hello@langchain.dev.\\n\\n# ☀️ Stay in the loop\\n\\nHere’s where our team hangs out, talks shop, spotlights cool work, and shares what we’re up to. We’d love to see you there too.\\n\\n- **Twitter:** We post about what we’re working on and what cool things we’re seeing in the space. If you tag @langchainai in your post, we’ll almost certainly see it, and can show you some love!\\n- **Discord:** connect with over 30,000 developers who are building with LangChain.\\n- **GitHub:** Open pull requests, contribute to a discussion, and/or contribute\\n- **Subscribe to our bi-weekly Release Notes:** a twice/month email roundup of the coolest things going on in our orbit', start_char_idx=None, end_char_idx=None, text_template='{metadata_str}\\n\\n{content}', metadata_template='{key}: {value}', metadata_seperator='\\n'), score=0.6764976978302002), NodeWithScore(node=TextNode(id_='2e0a54af-3f6d-474d-85e0-42401ed222b2', embedding=None, metadata={}, excluded_embed_metadata_keys=[], excluded_llm_metadata_keys=[], relationships={: RelatedNodeInfo(node_id='autollm/temp/docs/docs/security.md_part_0', node_type=None, metadata={}, hash=None)}, hash='6188650fc9d9c0e8321449593c95f64f082d69ce62332dbb2310a88ad11a40cd', text=\"# Security\\n\\nLangChain has a large ecosystem of integrations with various external resources like local and remote file systems, APIs and databases. These integrations allow developers to create versatile applications that combine the power of LLMs with the ability to access, interact with and manipulate external resources.\\n\\n## Best Practices\\n\\nWhen building such applications developers should remember to follow good security practices:\\n\\n* **Limit Permissions**: Scope permissions specifically to the application's need. Granting broad or excessive permissions can introduce significant security vulnerabilities. To avoid such vulnerabilities, consider using read-only credentials, disallowing access to sensitive resources, using sandboxing techniques (such as running inside a container), etc. as appropriate for your application.\\n* **Anticipate Potential Misuse**: Just as humans can err, so can Large Language Models (LLMs). Always assume that any system access or credentials may be used in any way allowed by the permissions they are assigned. For example, if a pair of database credentials allows deleting data, it’s safest to assume that any LLM able to use those credentials may in fact delete data.\\n* **Defense in Depth**): No security technique is perfect. Fine-tuning and good chain design can reduce, but not eliminate, the odds that a Large Language Model (LLM) may make a mistake. It’s best to combine multiple layered security approaches rather than relying on any single layer of defense to ensure security. For example: use both read-only permissions and sandboxing to ensure that LLMs are only able to access data that is explicitly meant for them to use.\\n\\nRisks of not doing so include, but are not limited to:\\n* Data corruption or loss.\\n* Unauthorized access to confidential information.\\n* Compromised performance or availability of critical resources.\\n\\nExample scenarios with mitigation strategies:\\n\\n* A user may ask an agent with access to the file system to delete files that should not be deleted or read the content of files that contain sensitive information. To mitigate, limit the agent to only use a specific directory and only allow it to read or write files that are safe to read or write. Consider further sandboxing the agent by running it in a container.\\n* A user may ask an agent with write access to an external API to write malicious data to the API, or delete data from that API. To mitigate, give the agent read-only API keys, or limit it to only use endpoints that are already resistant to such misuse.\\n* A user may ask an agent with access to a database to drop a table or mutate the schema. To mitigate, scope the credentials to only the tables that the agent needs to access and consider issuing READ-ONLY credentials.\\n\\nIf you're building applications that access external resources like file systems, APIs\\nor databases, consider speaking with your company's security team to determine how to best\\ndesign and secure your applications.\\n\\n## Reporting a Vulnerability\\n\\nPlease report security vulnerabilities by email to security@langchain.dev. This will ensure the issue is promptly triaged and acted upon as needed.\\n\\n## Enterprise solutions\\n\\nLangChain may offer enterprise solutions for customers who have additional security\\nrequirements. Please contact us at sales@langchain.dev.\", start_char_idx=None, end_char_idx=None, text_template='{metadata_str}\\n\\n{content}', metadata_template='{key}: {value}', metadata_seperator='\\n'), score=0.6669061779975891), NodeWithScore(node=TextNode(id_='51890512-91b4-475d-bcbc-98cce56bee8c', embedding=None, metadata={}, excluded_embed_metadata_keys=[], excluded_llm_metadata_keys=[], relationships={: RelatedNodeInfo(node_id='autollm/temp/docs/docs/guides/debugging.md_part_0', node_type=None, metadata={}, hash=None)}, hash='6e811b963f3a237b16b338b46dce518e98118db145239d69e293171e1f40a75e', text=\"> Finished chain.\\n\\n\\n 'The director of the 2023 film Oppenheimer is Christopher Nolan. He is 53 years old in 2023, which is approximately 19345 days.'\\n```\\n\\n\\n\\n\\n\\n## Other callbacks\\n\\n`Callbacks` are what we use to execute any functionality within a component outside the primary component logic. All of the above solutions use `Callbacks` under the hood to log intermediate steps of components. There are a number of `Callbacks` relevant for debugging that come with LangChain out of the box, like the FileCallbackHandler. You can also implement your own callbacks to execute custom functionality.\\n\\nSee here for more info on Callbacks, how to use them, and customize them.\", start_char_idx=None, end_char_idx=None, text_template='{metadata_str}\\n\\n{content}', metadata_template='{key}: {value}', metadata_seperator='\\n'), score=0.6577410697937012), NodeWithScore(node=TextNode(id_='0619c16d-94cb-4423-bb89-dbf3df6dbd93', embedding=None, metadata={}, excluded_embed_metadata_keys=[], excluded_llm_metadata_keys=[], relationships={: RelatedNodeInfo(node_id='autollm/temp/docs/docs/guides/pydantic_compatibility.md_part_0', node_type=None, metadata={}, hash=None)}, hash='a38d1ca616b5edff4565c7cc5e1da9c5f9fc041c64fec05afd379e12eec81d2e', text='# Pydantic compatibility\\n\\n- Pydantic v2 was released in June, 2023 (https://docs.pydantic.dev/2.0/blog/pydantic-v2-final/)\\n- v2 contains has a number of breaking changes (https://docs.pydantic.dev/2.0/migration/)\\n- Pydantic v2 and v1 are under the same package name, so both versions cannot be installed at the same time\\n\\n## LangChain Pydantic migration plan\\n\\nAs of `langchain>=0.0.267`, LangChain will allow users to install either Pydantic V1 or V2. \\n * Internally LangChain will continue to use V1.\\n * During this time, users can pin their pydantic version to v1 to avoid breaking changes, or start a partial\\n migration using pydantic v2 throughout their code, but avoiding mixing v1 and v2 code for LangChain (see below).\\n\\nUser can either pin to pydantic v1, and upgrade their code in one go once LangChain has migrated to v2 internally, or they can start a partial migration to v2, but must avoid mixing v1 and v2 code for LangChain.\\n\\nBelow are two examples of showing how to avoid mixing pydantic v1 and v2 code in\\nthe case of inheritance and in the case of passing objects to LangChain.', start_char_idx=None, end_char_idx=None, text_template='{metadata_str}\\n\\n{content}', metadata_template='{key}: {value}', metadata_seperator='\\n'), score=0.634380042552948)], metadata={'bbd4538e-34b5-414b-a8e0-fba7d87baf44': {}, '56d2c06c-5b9c-47d3-b706-c361f2c31bdd': {}, '2e0a54af-3f6d-474d-85e0-42401ed222b2': {}, '51890512-91b4-475d-bcbc-98cce56bee8c': {}, '0619c16d-94cb-4423-bb89-dbf3df6dbd93': {}})" 1885 | ] 1886 | }, 1887 | "metadata": {}, 1888 | "execution_count": 24 1889 | } 1890 | ] 1891 | }, 1892 | { 1893 | "cell_type": "code", 1894 | "source": [ 1895 | "print(response.response)" 1896 | ], 1897 | "metadata": { 1898 | "colab": { 1899 | "base_uri": "https://localhost:8080/" 1900 | }, 1901 | "id": "Eyhz6yU9AZT-", 1902 | "outputId": "d5a42418-dc5f-485a-d994-be5ef2b4dd33" 1903 | }, 1904 | "execution_count": 25, 1905 | "outputs": [ 1906 | { 1907 | "output_type": "stream", 1908 | "name": "stdout", 1909 | "text": [ 1910 | "In the context of LangChain, a \"Chain\" refers to a sequence of components that are executed in order to perform a specific task or achieve a desired outcome. These components can include data processing steps, machine learning models, or any other functionality that is needed to complete the task. The Chain in LangChain allows users to define and customize the sequence of components to suit their specific needs.\n" 1911 | ] 1912 | } 1913 | ] 1914 | }, 1915 | { 1916 | "cell_type": "code", 1917 | "source": [ 1918 | "import gradio as gr\n", 1919 | "def chat_function(query):\n", 1920 | " return query_engine.query(query).response" 1921 | ], 1922 | "metadata": { 1923 | "id": "fh1strkjBAUr" 1924 | }, 1925 | "execution_count": 26, 1926 | "outputs": [] 1927 | }, 1928 | { 1929 | "cell_type": "code", 1930 | "source": [ 1931 | "demo = gr.Interface(fn=chat_function, inputs=\"text\", outputs = \"text\")\n", 1932 | "demo.launch(share=True)" 1933 | ], 1934 | "metadata": { 1935 | "colab": { 1936 | "base_uri": "https://localhost:8080/", 1937 | "height": 591 1938 | }, 1939 | "id": "zlF-W4mqBAYT", 1940 | "outputId": "8ee1eef2-725e-40d8-b97c-4496d19e63c7" 1941 | }, 1942 | "execution_count": 27, 1943 | "outputs": [ 1944 | { 1945 | "output_type": "stream", 1946 | "name": "stdout", 1947 | "text": [ 1948 | "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n", 1949 | "Running on public URL: https://1edaabc88a4d7151b7.gradio.live\n", 1950 | "\n", 1951 | "This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n" 1952 | ] 1953 | }, 1954 | { 1955 | "output_type": "display_data", 1956 | "data": { 1957 | "text/plain": [ 1958 | "" 1959 | ], 1960 | "text/html": [ 1961 | "
" 1962 | ] 1963 | }, 1964 | "metadata": {} 1965 | }, 1966 | { 1967 | "output_type": "execute_result", 1968 | "data": { 1969 | "text/plain": [] 1970 | }, 1971 | "metadata": {}, 1972 | "execution_count": 27 1973 | } 1974 | ] 1975 | }, 1976 | { 1977 | "cell_type": "code", 1978 | "source": [], 1979 | "metadata": { 1980 | "id": "m0tYxNy2Bcyn" 1981 | }, 1982 | "execution_count": null, 1983 | "outputs": [] 1984 | } 1985 | ] 1986 | } --------------------------------------------------------------------------------