mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-01 22:14:03 -04:00
Compare commits
1574 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 335020e242 | |||
| 3d1808b5d2 | |||
| a19cbc7fe0 | |||
| b8f0cbc4e0 | |||
| 7e8230b056 | |||
| 8be45899a7 | |||
| c4800bcf82 | |||
| fd38a253b7 | |||
| 510191cb5d | |||
| 7934ade092 | |||
| a6c1eab762 | |||
| 515f2c1e3d | |||
| dc85649ead | |||
| d2b2722a30 | |||
| a2bbd62399 | |||
| 969365ca0a | |||
| 819af453d6 | |||
| 9db36f7384 | |||
| efa221116f | |||
| 83c3897539 | |||
| e1cbce1f80 | |||
| 02b22da384 | |||
| 0aa61db547 | |||
| 90d265cf47 | |||
| fc2d5ea1cd | |||
| ef4f63d9f4 | |||
| d17450fdfb | |||
| 805d2b0d55 | |||
| 6d22fa2a50 | |||
| 16f0068175 | |||
| 1054c3382a | |||
| e60328b086 | |||
| 3371dfb89f | |||
| 2065a16a07 | |||
| 5dae534f8d | |||
| 3d503cb810 | |||
| daf8522bec | |||
| 223f3136b4 | |||
| c6bad7d951 | |||
| 630b425545 | |||
| 4c7b891446 | |||
| a9c5b4899b | |||
| a7b0ac3cb7 | |||
| a7540ff47b | |||
| c69605f406 | |||
| ee20c44d9b | |||
| 1d470363df | |||
| b39f40dbd8 | |||
| fadc8b8ea0 | |||
| ea92b6986d | |||
| 17f9022d22 | |||
| 14792cd8b4 | |||
| 7ae6eaa0a2 | |||
| dbb5bd9f23 | |||
| aacd606204 | |||
| f865c984d3 | |||
| 7b10882d06 | |||
| f066e50482 | |||
| fd8c882792 | |||
| d89ebe0261 | |||
| 968feb32cd | |||
| 43f6f56c5b | |||
| b2364dc5ba | |||
| 67f4db8501 | |||
| e4151a8b02 | |||
| 4d4cd8ac6b | |||
| 4fc001c8de | |||
| cf675bdc7a | |||
| 660b831b9e | |||
| ad85bd0b46 | |||
| 18ec1f2f61 | |||
| b0fbd8b5c8 | |||
| c0dfc8c641 | |||
| a8d3fa68a1 | |||
| f9470c470a | |||
| 95a5cc6ee1 | |||
| 487782cd98 | |||
| 58e65d399e | |||
| fdad3d66ac | |||
| a6db5dd29b | |||
| 7b684c4480 | |||
| c66868a98a | |||
| 14cc9ebe59 | |||
| 396b1e1474 | |||
| 69f3095424 | |||
| dc8bd5ea92 | |||
| 4af9a77d8b | |||
| 9c1d094455 | |||
| 0a8e3fdbcd | |||
| 1c0e0e1e1d | |||
| 47a7c3ea15 | |||
| 898cff0d6a | |||
| 9df37edef4 | |||
| f86a7a4fa3 | |||
| 35430d3609 | |||
| 3c162b2b4a | |||
| 5bb4531245 | |||
| 2ff0a89891 | |||
| d57917d782 | |||
| f231e0739f | |||
| 0765742ef3 | |||
| ec7fd6be5c | |||
| c7a918c3f5 | |||
| 00e681d43b | |||
| c01502fb84 | |||
| 075f88dbc3 | |||
| cc47ee0602 | |||
| 5e6ef55a5a | |||
| 9c73f0a530 | |||
| 52a4d2b83d | |||
| 0fd78d5434 | |||
| 5c4f4a8d83 | |||
| 620c63cd19 | |||
| cb51ad90ea | |||
| 359fd33041 | |||
| efb7e1b868 | |||
| 98ba1e71bd | |||
| fd4b09d375 | |||
| 7c90e1b6b4 | |||
| 21ba0a80d1 | |||
| 9df9a8fc1d | |||
| 60b185ff53 | |||
| ca75c81bc0 | |||
| 691c5bcaf1 | |||
| 9ab998c5d5 | |||
| 938b417028 | |||
| fa60fc66ae | |||
| 5607ed2fec | |||
| f57ad6150e | |||
| 2486bd8f41 | |||
| e2a0876ddd | |||
| a75d899a57 | |||
| 809a6e7eea | |||
| da6eb6474b | |||
| cd83f8ee4f | |||
| 534d5505cb | |||
| eb87b96518 | |||
| 9510d45046 | |||
| 9b5b012fdf | |||
| a5a75f618d | |||
| 051faddefd | |||
| 9f22aae57c | |||
| e9a111d9d3 | |||
| bb7622e4d4 | |||
| 06f632b2cb | |||
| 76b925e62a | |||
| 0493f679a4 | |||
| 0e0a627c9a | |||
| 4ba2cfe7ab | |||
| c1578a19d9 | |||
| ae49ff4e15 | |||
| a75af835a5 | |||
| 7c7cd34908 | |||
| f651891196 | |||
| 04714c886f | |||
| cf28574f51 | |||
| 24d065f054 | |||
| b8719586e3 | |||
| 07a40aca49 | |||
| 33b562938d | |||
| 723b41c23c | |||
| 4c38c1be0b | |||
| 0dde0ca27f | |||
| f3e0d07f48 | |||
| 1364e8eeed | |||
| 96fc69cc61 | |||
| 3b7736f763 | |||
| a7a7afe66e | |||
| c646ee2eca | |||
| 5729bd92fd | |||
| e0e52cf879 | |||
| 6f75306c17 | |||
| 94cb4ad810 | |||
| 1ea4014746 | |||
| 6a9a7b1458 | |||
| 1c168cd531 | |||
| 62cba5236d | |||
| d265e96420 | |||
| d30bbf799f | |||
| 53fd00a7c3 | |||
| 83f2848d47 | |||
| 313071e9cd | |||
| 5f6782038a | |||
| fe08d0451b | |||
| 59c5e5c3d4 | |||
| ee697fb1b3 | |||
| cf3320a4ea | |||
| f2ed69f2f8 | |||
| 3489e7de84 | |||
| 468bda594e | |||
| 6f3a31caf6 | |||
| 63e9846e97 | |||
| b7382b0d24 | |||
| 2a8241328d | |||
| 0b20ff9f17 | |||
| 1fc26046e3 | |||
| b17d439d6d | |||
| 040160c360 | |||
| 981811efd1 | |||
| d563b45a27 | |||
| 2774e80234 | |||
| 449274ca5a | |||
| 78037a664c | |||
| 1d9e3b1000 | |||
| df83e32107 | |||
| f7b4e94231 | |||
| 4c07a2655d | |||
| 5c0c8b2ec4 | |||
| e5e18688a6 | |||
| b6fb10eba8 | |||
| df441e28f4 | |||
| a4e05ec7ab | |||
| 96f72ad86e | |||
| f3556c011c | |||
| ebc510582b | |||
| f3bfdc29e3 | |||
| 6cce3b12ea | |||
| 0273e9739a | |||
| 7c8b883448 | |||
| c2bb418542 | |||
| ed6acbead0 | |||
| 976cce40d7 | |||
| e4fd4158bb | |||
| 31d5dffcef | |||
| d12edee802 | |||
| ac41ed3aae | |||
| d8c1159032 | |||
| c856c5becb | |||
| 50e6b57be0 | |||
| 8b7fdba544 | |||
| 22ae8d0166 | |||
| 23bcc379a8 | |||
| bdc4bfe7b0 | |||
| 025ffe6b50 | |||
| a6595747fa | |||
| d902cc3e7e | |||
| 726eb41359 | |||
| e9714dbfcd | |||
| a3618e761e | |||
| 24eabe7f35 | |||
| ecfa939ea6 | |||
| b48bcc3add | |||
| fa01fa2051 | |||
| fb36eff5e1 | |||
| d24d3d1e8c | |||
| 5c4badbcca | |||
| 2cd1383dc8 | |||
| 72440c101f | |||
| 423d66b07a | |||
| b42adebd51 | |||
| 749b43a3b1 | |||
| 8daaef44ee | |||
| ac07e3cbe6 | |||
| 1a6137b323 | |||
| 85c2e198a4 | |||
| 01263c4cfd | |||
| fbd5e0174d | |||
| 70ccb4ae65 | |||
| 7eb331774d | |||
| 24a3f058a3 | |||
| 84c28f95f9 | |||
| 7af57982fe | |||
| 6b70c5408f | |||
| 74fc725f37 | |||
| a0a74aed60 | |||
| 11feef8c82 | |||
| 9c5ff164ac | |||
| 7edeb1c2d7 | |||
| 8b95abdc85 | |||
| ffe0cd1ef1 | |||
| 5d2111a19f | |||
| 68ac7fd57f | |||
| 7320d96a36 | |||
| ee17fb475b | |||
| 28b877e31f | |||
| 4389b80a52 | |||
| d3bc663951 | |||
| 4810364788 | |||
| 2dcad52dd9 | |||
| 0bf8d80b12 | |||
| e4bba02aec | |||
| 1caa0da657 | |||
| 711c814bb2 | |||
| 5b832eb927 | |||
| 49988431f6 | |||
| 72d65dd51a | |||
| 553bc55b19 | |||
| fc6f69833c | |||
| c7fd06841f | |||
| 4648da6849 | |||
| 0188cf3bb6 | |||
| e0b4f9c047 | |||
| 4895bba96e | |||
| 76d1df817b | |||
| 83d7f415e2 | |||
| ae1149ffaf | |||
| 0148354dbe | |||
| 11b3856334 | |||
| e8f229cd01 | |||
| 75b70e5824 | |||
| 1711f6d8fc | |||
| 20d16abdf4 | |||
| 2411c9fbd0 | |||
| be3e280f2a | |||
| 2afcbe6587 | |||
| 22ff486fbe | |||
| eed0b0415d | |||
| d9d6c56ed5 | |||
| f99a237093 | |||
| fcbf18344c | |||
| bf8cbeb6c5 | |||
| e27e7dd054 | |||
| 8b66cf4341 | |||
| 6f4549bdea | |||
| c654398f75 | |||
| 0664a99945 | |||
| 58abc5731b | |||
| 7498b1e0f1 | |||
| 07a275fea5 | |||
| 1b6263e08d | |||
| 089f1d49c0 | |||
| 01c184c608 | |||
| 1752463ee6 | |||
| c825a2f743 | |||
| ba058dc8d4 | |||
| 04b2f8e062 | |||
| 62b874e14f | |||
| 9c9e9b4e03 | |||
| e3c307ab55 | |||
| b1b2baa969 | |||
| 0452af91cc | |||
| da5cfc42e5 | |||
| eb89223386 | |||
| 93dc3a31b3 | |||
| 345300f110 | |||
| f322c5d202 | |||
| 376d29a78f | |||
| 224d507ab5 | |||
| 1f680d731d | |||
| f0a1cc51b4 | |||
| fee3280799 | |||
| 54925bf1ae | |||
| 91d02a4fc0 | |||
| 086b94038e | |||
| 5d5716b339 | |||
| fb6db454d4 | |||
| e4d4e0d024 | |||
| 17724d961e | |||
| 6776910c93 | |||
| 15962b36f0 | |||
| 3d9a802734 | |||
| 9cd8f8b0cf | |||
| b44330cbc6 | |||
| 3d5ba0873c | |||
| d917cdc3fa | |||
| b370edf329 | |||
| ec59acd329 | |||
| c69e740c56 | |||
| 6cf6ae631c | |||
| 2562244fb6 | |||
| a2691ee163 | |||
| ab700ea546 | |||
| e775afc3f2 | |||
| 92f07824a7 | |||
| b7cfe5bce6 | |||
| 3ccfb28352 | |||
| 325aa51e51 | |||
| d1d9bd6e41 | |||
| 9a71382243 | |||
| b974eea341 | |||
| e82632f83d | |||
| 1a65ead849 | |||
| 50b7d1b7bb | |||
| 09beb72f5b | |||
| 9bbbc67c8e | |||
| b3681bf681 | |||
| b548b1443b | |||
| 0e980d962d | |||
| 3ed6acc6a6 | |||
| 56746c240f | |||
| 5c1c2c7f5b | |||
| a699086f46 | |||
| 454c204112 | |||
| 277468160d | |||
| a0f424e592 | |||
| 3ae832ca28 | |||
| 16ef5dd631 | |||
| c4bd0a5215 | |||
| f5c8ca7dfb | |||
| 36ddec44af | |||
| c147d8a271 | |||
| 1c444d58b6 | |||
| 1f910f7566 | |||
| 99826cff43 | |||
| e8f8bea969 | |||
| 304484b77a | |||
| 29fed77d58 | |||
| db070588c8 | |||
| 76deca7fea | |||
| f326ab86d2 | |||
| ca8d9709e0 | |||
| e0af059221 | |||
| 8bf5b4acfd | |||
| 93a003baa0 | |||
| 5d9b0bd3f0 | |||
| 9a5525e1b3 | |||
| 7dce3d28d3 | |||
| d4c1482c1c | |||
| 3a96a483a6 | |||
| 7467fce2d4 | |||
| 06af08cac4 | |||
| 83ebdfb1c5 | |||
| 835b1ac000 | |||
| f10b41dbc1 | |||
| 41fe871e2f | |||
| 321c39ddc7 | |||
| f7f1af0139 | |||
| a8c9c279d6 | |||
| eece129831 | |||
| 80e4f51a83 | |||
| 22ff0837c3 | |||
| 74d7e05bcb | |||
| 1feb23bb83 | |||
| 08c55ec258 | |||
| 394e797567 | |||
| 6c3e5d08b8 | |||
| 6e19482814 | |||
| 42eb73a08f | |||
| 4b59ffee45 | |||
| d4e853c8b5 | |||
| a94b8ec3d2 | |||
| ed57e6b7be | |||
| 05f006e7e1 | |||
| c3aed72c29 | |||
| 7deba94e6b | |||
| d15811f09f | |||
| 2ef62a93bb | |||
| 9015aea527 | |||
| 4bb401e6f9 | |||
| a87a4d1222 | |||
| d27ad16335 | |||
| 20498a2bce | |||
| 0730140e62 | |||
| 810711d355 | |||
| f3b34b457c | |||
| 6f4b9f3372 | |||
| 01658fdb31 | |||
| 66c26d9cce | |||
| a4060a7914 | |||
| 469e438741 | |||
| 56fabbb4f5 | |||
| dfd8cc1ba4 | |||
| cba54061a2 | |||
| ed467a9889 | |||
| 3c4791007f | |||
| 8f16a179c3 | |||
| ce3a4cac6c | |||
| be46044b98 | |||
| 154c7f8e36 | |||
| 8b6c2b45a6 | |||
| b1a4a74270 | |||
| d7fb095fbd | |||
| 58791d4bdd | |||
| d3b635b193 | |||
| 436bc41f82 | |||
| 834f49275a | |||
| a44e54f9ec | |||
| a51ed8dd70 | |||
| c8cfc6c06d | |||
| 83b2f0b0af | |||
| 1a6abb38bc | |||
| 6bc5bddb59 | |||
| e6d6576b2f | |||
| bf25ff6104 | |||
| 32ad0992cf | |||
| af650343d9 | |||
| f6f4ca44bd | |||
| 9aa918f026 | |||
| 00a92cd125 | |||
| 73819bf19d | |||
| d10cca28fc | |||
| 1378ec4e50 | |||
| 24a9d1e816 | |||
| b100684bad | |||
| c375cd5c6b | |||
| 45952dee59 | |||
| 6db7f23ec7 | |||
| 0721a84900 | |||
| 4d4bd85448 | |||
| 11ae9267ae | |||
| 174cb3e6da | |||
| 5ab5e5191d | |||
| 54230f0477 | |||
| 3d484da1c5 | |||
| 631f0001ef | |||
| 060b700e09 | |||
| 83c24f4d50 | |||
| 883266939e | |||
| a29d8351c8 | |||
| da1f025229 | |||
| 6b1ded41a9 | |||
| e01cc053e3 | |||
| 6e156edb11 | |||
| 0b519958e9 | |||
| 265976df12 | |||
| 7e1b96a2db | |||
| 8e26f753b7 | |||
| 31e3251435 | |||
| 058c275a72 | |||
| 6ff7576eb9 | |||
| 94543decad | |||
| b963782137 | |||
| 52c47cada3 | |||
| 9216312b11 | |||
| 660a2b3495 | |||
| 6d21092805 | |||
| fb2c1fa917 | |||
| 37525df529 | |||
| a1f24753d9 | |||
| aa0f586330 | |||
| ff03139799 | |||
| 1b1081b9c9 | |||
| 047ae07e74 | |||
| d8aa29a115 | |||
| 34fb1d8992 | |||
| c517f35526 | |||
| e072c45393 | |||
| 51241865f8 | |||
| 10c83485d2 | |||
| 1e6a18ad2d | |||
| 9e133ac10d | |||
| ba217eec2c | |||
| 64ef70b735 | |||
| 6615aaa4ab | |||
| 447105a6dc | |||
| 320be3fab6 | |||
| bbd9f85a45 | |||
| 5f29ba5e2c | |||
| 4aba02eb82 | |||
| 75736ad01b | |||
| 68a508fcd0 | |||
| 6281fc8c91 | |||
| c3747d092a | |||
| 24a39aefb8 | |||
| 0b1299036d | |||
| 2c8d7941f0 | |||
| a1a72ab223 | |||
| b99ab056d1 | |||
| 1a45b44307 | |||
| 804c57519f | |||
| ce94780b95 | |||
| 645fcf6c24 | |||
| e37fa5d9ca | |||
| 97e4ecd5b8 | |||
| b6a660651b | |||
| 456d3fb0b3 | |||
| efa326a871 | |||
| 5765b637ce | |||
| 72687b4f69 | |||
| 0c67e1f8f3 | |||
| 4a0619758a | |||
| bc7a11cdbe | |||
| 5596e31947 | |||
| 2fe2b813ba | |||
| be5df5b01b | |||
| e74fe88342 | |||
| f1862ccab1 | |||
| 9e74a4327f | |||
| 5e61934d5a | |||
| 2008efe0ee | |||
| ee719a1fda | |||
| 1dce275a7c | |||
| d10533ef77 | |||
| 8aeb8ae690 | |||
| e8c41c5c27 | |||
| 051b4ddfa2 | |||
| 61103b677b | |||
| e69cac672a | |||
| 94246a3ca8 | |||
| b440a008e5 | |||
| 46227f2a70 | |||
| 77f0298f6f | |||
| c14e112236 | |||
| 62b035fdc1 | |||
| aa0be1469b | |||
| 5016f21d52 | |||
| 130b7992a1 | |||
| 0d50b22dbf | |||
| db1d1f57c9 | |||
| dccb8163d8 | |||
| 1ab3ba407e | |||
| b03f765733 | |||
| 7488d3c235 | |||
| 5cb270d07f | |||
| 62771058aa | |||
| ca348a6570 | |||
| 44a7fd72e8 | |||
| d8d952d937 | |||
| 216ba1f22b | |||
| 74686f5776 | |||
| 1ebf9e67a4 | |||
| aeefc77da0 | |||
| 13d8d7cbbe | |||
| 9c34e44b85 | |||
| cb2dc802d9 | |||
| 5a6cc0e32e | |||
| a63256eb84 | |||
| 0a160b97a0 | |||
| 95602c7959 | |||
| 20bc466ca1 | |||
| efb1c56ba5 | |||
| 286499388d | |||
| 460c6574cc | |||
| 8b0e0e3cc8 | |||
| 87142b29fa | |||
| 501b844f0f | |||
| 03157dc295 | |||
| ef80b684f7 | |||
| 472e70feee | |||
| cfb90f7666 | |||
| 2e3a287a27 | |||
| 635fbb8618 | |||
| d2d34acb31 | |||
| cf70edbede | |||
| 79b7d246bd | |||
| bcc3d0b4d1 | |||
| 238ca86534 | |||
| 1f3efe8947 | |||
| 89324b4067 | |||
| 8cc848aee6 | |||
| cd54a7a66b | |||
| dca02f7277 | |||
| b757fa9aa3 | |||
| bc594a0674 | |||
| 208282d62f | |||
| 060880abfe | |||
| 728b35e774 | |||
| bdaa043404 | |||
| a55cf8d870 | |||
| cf4244fd3a | |||
| 76c3fd64ad | |||
| 701e0ac2be | |||
| a285f8ba3a | |||
| 663821cdf6 | |||
| c4b95494ac | |||
| 980fb4e5a3 | |||
| 96f8f40291 | |||
| 1c698df6e0 | |||
| 298cb433be | |||
| 63af7dd99d | |||
| af5df1d083 | |||
| a3b44093c2 | |||
| c80bf3311f | |||
| 7940d249b0 | |||
| 4a07c81f71 | |||
| 7d56cdf045 | |||
| 0affe621d5 | |||
| 93932b1a9c | |||
| a87f13b9d2 | |||
| 8d2b21ee75 | |||
| 87741c9be8 | |||
| 171cb89170 | |||
| 5dad867bbe | |||
| 13f26fd84d | |||
| 3bc77f7d7f | |||
| aac1ee3af3 | |||
| e85893ac0f | |||
| 315947ee6f | |||
| 23a0d44b11 | |||
| 3b501de057 | |||
| 6cc645aa2a | |||
| 0b37207adc | |||
| f0704ec705 | |||
| 4fcbdf710e | |||
| 866149193a | |||
| 6ffb161618 | |||
| 8e4b49824b | |||
| 5263576de1 | |||
| 6d4e2ea0e9 | |||
| 3cbfa98e6b | |||
| d256cbe0e0 | |||
| a6dfa30dcf | |||
| d0365dc434 | |||
| aa41432bbb | |||
| 98a2b4a547 | |||
| 806ce9a360 | |||
| 8b28092cc8 | |||
| 5c5f4c1c84 | |||
| 949d330295 | |||
| 9a5ee4f37a | |||
| 7a23cc6c84 | |||
| 041acd11fe | |||
| 24b4033db9 | |||
| 1115f83b8f | |||
| 60a1603636 | |||
| ea467fa031 | |||
| b0e6f73b1d | |||
| 6d9e015b5e | |||
| fececd89ab | |||
| 48e287892f | |||
| f118400820 | |||
| 3f8407c7af | |||
| 83317739c7 | |||
| 0b665bd1ca | |||
| 98d4cbdf95 | |||
| 6cb75b54a0 | |||
| 53edfe93cf | |||
| b856deae43 | |||
| 259c842259 | |||
| ffb195ea7a | |||
| b4677534d1 | |||
| f967b82467 | |||
| c81946930e | |||
| 1008b775a4 | |||
| 41210dfc51 | |||
| 67b7272249 | |||
| 964e045903 | |||
| 137cf67f40 | |||
| 309a526e3c | |||
| dd95927498 | |||
| 4f72feae91 | |||
| 3cd8f9f597 | |||
| d2e8d0c62a | |||
| fafbd8c9c7 | |||
| a40c91b054 | |||
| 98894055c6 | |||
| 4589a84643 | |||
| e6b7f52d3e | |||
| b169db617a | |||
| 89a49f4f4f | |||
| 58490715fe | |||
| 4c2283c4e5 | |||
| a059070dec | |||
| 20dfeb4cfa | |||
| aefc3266c1 | |||
| fdf48dd459 | |||
| 66525346a2 | |||
| c9b2ec4a2b | |||
| bf583a7266 | |||
| de194d1c73 | |||
| ecdc289df1 | |||
| 9e198ac40d | |||
| 0a06998690 | |||
| 484a7105a9 | |||
| 8d18ea167b | |||
| a2ca89bfe0 | |||
| edeea40898 | |||
| 2a7080b094 | |||
| b354f2386b | |||
| d766bd03d2 | |||
| 6a69148356 | |||
| e1e1b0b522 | |||
| d824876653 | |||
| 2048698f77 | |||
| 9942979aa7 | |||
| 3c2655a1f9 | |||
| 552a61a66f | |||
| d13143e322 | |||
| 5116ad8d08 | |||
| 64683a55f3 | |||
| 698cd9c631 | |||
| c744a99102 | |||
| 2d2935085e | |||
| 1b31e2c8cd | |||
| 7257751993 | |||
| de6bfdb1b1 | |||
| 9e49f4411b | |||
| 026d068ddf | |||
| 7055d6fc3c | |||
| e9c2366bf1 | |||
| 6278152e49 | |||
| 76010c0cea | |||
| 889b84cfb9 | |||
| a26681c416 | |||
| 90027a7b44 | |||
| aab56faf88 | |||
| c57bd11c45 | |||
| 3fa1e29468 | |||
| cf87f84900 | |||
| 402d4ef013 | |||
| fc94906a1e | |||
| b83fcd11e4 | |||
| c28af7c7bc | |||
| dbc853bcc5 | |||
| c8396c5a3c | |||
| 65af8d3a26 | |||
| 329b6ec958 | |||
| 09bf27abd7 | |||
| 2ec6a529c7 | |||
| e8e21a0e4e | |||
| 88d243f145 | |||
| 3a6e287443 | |||
| beb3e5cd7f | |||
| 7416a87e10 | |||
| 65b85b237e | |||
| b17a80014a | |||
| ff87f99807 | |||
| 65d834615d | |||
| b8be4c09e2 | |||
| e5fb332538 | |||
| 491033d534 | |||
| 885fa316a5 | |||
| b6ed679771 | |||
| 68fc6e8b50 | |||
| ea0331ef5a | |||
| 6827e245b8 | |||
| ef25d6960c | |||
| f740f44cf2 | |||
| a5e4e6d857 | |||
| cfdd6db530 | |||
| d4eda9f396 | |||
| a433b107e0 | |||
| 59f9fb6c3f | |||
| 09d532ebcc | |||
| cfd6f3ca8c | |||
| 95add73c38 | |||
| 9ee036b160 | |||
| c2b521199c | |||
| ee9f3f373a | |||
| f205358587 | |||
| 255ae7dced | |||
| b4c6d509a0 | |||
| 34cd57b639 | |||
| 50dfd7bf60 | |||
| 0b57187909 | |||
| e78e9f4832 | |||
| 383933adb5 | |||
| dd054137bf | |||
| cf3b7571eb | |||
| ae7a2c202a | |||
| 9b00d578bc | |||
| b8173e4c4e | |||
| 67b5445fb9 | |||
| 87419ef5d1 | |||
| ad218160d8 | |||
| eeb90d7991 | |||
| 7b7329bd18 | |||
| b3acbb06f4 | |||
| 7db7562841 | |||
| 0e75b124c3 | |||
| d79a0b76f3 | |||
| c3eb4933fb | |||
| e3a956aedd | |||
| e562e479dc | |||
| 1900e019e3 | |||
| 317f140822 | |||
| cd829474d6 | |||
| b6c1500570 | |||
| d06a85bd34 | |||
| 6b9a2feac5 | |||
| bd08004afe | |||
| 0ecc4b2051 | |||
| f9f351229a | |||
| 72659a237b | |||
| 6cc3a36d44 | |||
| 6fe55d6e88 | |||
| 36f2903eb3 | |||
| 09464e6da7 | |||
| 955e084cf3 | |||
| 46ee0c8765 | |||
| da5391c018 | |||
| ce732beece | |||
| 889b70093c | |||
| 7211a27f01 | |||
| ba95ca3fb6 | |||
| ffdc507625 | |||
| 8aef0dece9 | |||
| c680af63ef | |||
| 4a7ac65184 | |||
| 4016c55604 | |||
| 0f64084c20 | |||
| 7af03d9205 | |||
| d903da626f | |||
| 177b446229 | |||
| ab9d941d15 | |||
| 66fd990624 | |||
| f6dabd0d3e | |||
| 74caaa2bf7 | |||
| 552403b370 | |||
| a93d09d159 | |||
| 0fb757f6c1 | |||
| a68053ca4e | |||
| 36d4f4027b | |||
| 19d92507e3 | |||
| 664e92a3d6 | |||
| d687c110e4 | |||
| af5ae7054e | |||
| dff1e7f552 | |||
| cf446401e5 | |||
| e9b87ef09b | |||
| 7231ddb1b3 | |||
| 1ead36f1bb | |||
| 8a9b78a4ab | |||
| 569299724a | |||
| 6dd401e1c7 | |||
| c4cb37786b | |||
| b757d9a94e | |||
| 6cc083f370 | |||
| c419027db9 | |||
| 6a16b47406 | |||
| 4197ae8b9f | |||
| 88696e1407 | |||
| 24cb48f195 | |||
| 965cfd291e | |||
| 873329c052 | |||
| 3d8023b9a9 | |||
| 93d1450fc1 | |||
| 27d55fde8c | |||
| 690399b04c | |||
| 65b84f1ab3 | |||
| 835acb89d0 | |||
| d9df9ea75c | |||
| 06874ffb69 | |||
| f0898a3930 | |||
| 7d50196d2f | |||
| f90f7fee64 | |||
| 3d860df873 | |||
| 2fe3a2b6a8 | |||
| eb3d4af204 | |||
| 0652352e92 | |||
| 103949513b | |||
| 9ba4547c4d | |||
| 4fea0adf43 | |||
| de070dbfa7 | |||
| 87eb72bdb2 | |||
| fe03aaae55 | |||
| 9ce7d3d648 | |||
| 0471407761 | |||
| e4b807a018 | |||
| 0a0ec37725 | |||
| 8abca5d818 | |||
| 3a29a8036b | |||
| e2b9b66f71 | |||
| bb66cb7e36 | |||
| 2159e77c9d | |||
| 3154f521d9 | |||
| fda8024607 | |||
| 89336e4ddf | |||
| a94f747307 | |||
| 88d3b41044 | |||
| 7fd02ab8d1 | |||
| 9e5d8e143e | |||
| f0f7df29b3 | |||
| 05ba70881c | |||
| 8a729cdd0d | |||
| ffe5fbcd51 | |||
| 18cc545e16 | |||
| c818e90cfc | |||
| 570973b9d6 | |||
| 09d19b99ba | |||
| 7ad30dc660 | |||
| 5c1702c527 | |||
| f1063d58ae | |||
| eee39221c4 | |||
| 4303961948 | |||
| e2790dabc8 | |||
| ba42aa592c | |||
| e1deba1222 | |||
| f9c2dd1b3a | |||
| 8bf0a41926 | |||
| 5c89aa54c4 | |||
| 69484526e6 | |||
| bfc84384ea | |||
| cce3b792db | |||
| bff40f27c5 | |||
| c3e3b598bb | |||
| fa17f7e352 | |||
| 3aed922a3b | |||
| 7c4e37c5cd | |||
| 2d8845b084 | |||
| 47f21796e0 | |||
| eb6de99fcb | |||
| 2bfc8f3161 | |||
| bcacf88e55 | |||
| 13766a82b2 | |||
| 34d7ca66f5 | |||
| 17a803bb17 | |||
| 1bd47969b3 | |||
| 5fec0f1135 | |||
| a73942ddea | |||
| 34a26e5e4d | |||
| f74dea5fae | |||
| ee3eb7d8e2 | |||
| 75f94eea1b | |||
| b737bda40d | |||
| d99b1d61d7 | |||
| 844029d8e5 | |||
| 9492cc64b5 | |||
| 5773f97e88 | |||
| 0784dc3a0a | |||
| 7993be7d0d | |||
| f22ce6e757 | |||
| 3c4347b247 | |||
| 977f2840b9 | |||
| 5d3bb6642e | |||
| 2001eb7ffb | |||
| f18c9f69d4 | |||
| 8e124e5b63 | |||
| 4ed5e544b0 | |||
| b185bda5b1 | |||
| d79804e271 | |||
| 2b356c8613 | |||
| 2e6b36ef4b | |||
| edd0f66234 | |||
| 2da407d66c | |||
| fa574f709e | |||
| 1e6171521b | |||
| 3f3e4eca66 | |||
| 648482b0f1 | |||
| bb46afe33d | |||
| 80f5914abf | |||
| 1c4e7f9c3e | |||
| e4ae6e9076 | |||
| f93efa2ea1 | |||
| 7d79365262 | |||
| 555692207e | |||
| fcc06b227a | |||
| 08a39790e4 | |||
| a8270082a0 | |||
| 85da798538 | |||
| b68d8697df | |||
| 7704df5042 | |||
| 16f04c7e7e | |||
| 7c6b3117bf | |||
| 7def68fb37 | |||
| 03ed2b4129 | |||
| 733d62a699 | |||
| f76e1d0796 | |||
| 88d42ccd8d | |||
| a0686fb1f2 | |||
| 3d198d94a6 | |||
| 036c00db73 | |||
| 548f0687f1 | |||
| f85c042a94 | |||
| 40e892f813 | |||
| 2381025306 | |||
| a0909dc053 | |||
| 853a14b7c7 | |||
| b31e2d42eb | |||
| 5b6ad9419f | |||
| a60948a87e | |||
| 8b420da753 | |||
| 12c079b74a | |||
| c835f78dd0 | |||
| d52eb9d4ee | |||
| 0cfd9f60b5 | |||
| 5ab65eb95a | |||
| b13fb36de0 | |||
| d8fe65a273 | |||
| ba1cb996cf | |||
| 41f41d6543 | |||
| e25fc44db9 | |||
| 2ea91dc94b | |||
| b16419ad3e | |||
| 1e3c05c408 | |||
| a7eb59f472 | |||
| e99448481c | |||
| 83ab7622d9 | |||
| d4312d504b | |||
| 95742e7704 | |||
| a8845a33df | |||
| b3fd87f302 | |||
| 25ba970e09 | |||
| a67f9aaad7 | |||
| 210ce35867 | |||
| 36905f6442 | |||
| ed509db04a | |||
| 14413c0637 | |||
| 9682c95da8 | |||
| 7c6eba90e5 | |||
| c85bf225b9 | |||
| b51c2d66a5 | |||
| 935bc52239 | |||
| 57ff51823c | |||
| 06b20a1772 | |||
| 7a98255149 | |||
| 980038c711 | |||
| 09d4e36200 | |||
| 8fb523bcef | |||
| e48a621d61 | |||
| 1f87787b05 | |||
| fb6cef8a0b | |||
| 21368f6218 | |||
| 116685017d | |||
| 23082f2c5e | |||
| ff2b3ca727 | |||
| e55d41f5df | |||
| 91fb5101d6 | |||
| 9c5e22a656 | |||
| 18f23b298e | |||
| ddf39ebeaa | |||
| 320b515e7d | |||
| 04c50ee946 | |||
| 3d626d68aa | |||
| 9c0442bdb5 | |||
| 606ffa40d1 | |||
| e9f6de1238 | |||
| 8110ab98b6 | |||
| b8c4bd70ae | |||
| 2e49856621 | |||
| 2039509811 | |||
| 420f2ddeb7 | |||
| afc0516868 | |||
| 02a0f5e96c | |||
| 2f7b05006b | |||
| 314089b0a1 | |||
| 60e626d6d0 | |||
| 5c2050ebcf | |||
| 7fd2870d45 | |||
| 609e3339c0 | |||
| 0e01723aee | |||
| 25141b85f9 | |||
| 21510bd664 | |||
| 696d1de19f | |||
| 56020b4bc3 | |||
| 62e29d5a51 | |||
| 15c890a7b8 | |||
| 43b33c558f | |||
| be0661f156 | |||
| b9a5a0498a | |||
| 8c4261500c | |||
| 2254d98bcc | |||
| 21f9096846 | |||
| 9830dc2962 | |||
| c29a8cc63b | |||
| ef7872eb4f | |||
| 3282223511 | |||
| c99c5eb03f | |||
| 3b759c26c4 | |||
| 5038a1f351 | |||
| 0aa7552de6 | |||
| 7fae7d2cde | |||
| f35d8e5b64 | |||
| 63cc0a35d3 | |||
| d159bdd50c | |||
| 0f2c609621 | |||
| 4e14952b24 | |||
| b36d4b2723 | |||
| bf53cd3d3d | |||
| f2e3935c0b | |||
| 77f41f9356 | |||
| 042500dd55 | |||
| f0be93313a | |||
| bf9e26319c | |||
| 5054eb3b10 | |||
| 9bea88c7b8 | |||
| 786c25d342 | |||
| d00f18d567 | |||
| 0f363487e9 | |||
| b471da75d6 | |||
| e5937ff6f8 | |||
| 08379e61bf | |||
| 6c8a65b055 | |||
| d059db62c3 | |||
| e4dd4a9036 | |||
| c0fc9f6e55 | |||
| 72d919566c | |||
| 2aeb3415b1 | |||
| 680a12f87e | |||
| 7a83b34c16 | |||
| ecd16f9fb0 | |||
| 54ca85d482 | |||
| 65ef0be90c | |||
| 57106affdf | |||
| d613bbd358 | |||
| d0bf2104dc | |||
| e70413373f | |||
| 36f0af5a5d | |||
| 79d7076121 | |||
| 526b3e74bf | |||
| d03dc21e8a | |||
| c31dfa4957 | |||
| c7e510723d | |||
| 42093de872 | |||
| 886e58828e | |||
| c8eaf1c9ac | |||
| 2169dadccc | |||
| 4bc8a7b733 | |||
| 61eb955921 | |||
| aa48a5d764 | |||
| 1dedca45ac | |||
| 9d90335a12 | |||
| b577acb115 | |||
| 425e2bcccc | |||
| 3766251891 | |||
| 3552de1b45 | |||
| 2b94e36df6 | |||
| d1e1de4a8d | |||
| 23587e17ad | |||
| 213f452f0b | |||
| 27a488539d | |||
| 283da50d33 | |||
| a809085715 | |||
| 67321f1cba | |||
| 7683186470 | |||
| fded43b77e | |||
| 22ff7da4e0 | |||
| 844561b6cc | |||
| 1fe02a3067 | |||
| 362d8ecb31 | |||
| 5f5f6389f9 | |||
| 31cf3cde45 | |||
| 11f0c2cab1 | |||
| 52bc1d8387 | |||
| 8a3ac0c338 | |||
| bb125d7d4f | |||
| a405716847 | |||
| bad6e03095 | |||
| 2330fddfbb | |||
| 61dfd74134 | |||
| 029ff83979 | |||
| dbbc4cb2e1 | |||
| 1cce21cdc2 | |||
| 8b786a51b3 | |||
| ad7537dd84 | |||
| 3bab23172a | |||
| 18c132d494 | |||
| d072353e08 | |||
| c8bbc101cc | |||
| b93f748998 | |||
| ecb100448a | |||
| c749c856b5 | |||
| 0baf278972 | |||
| ae7780266a | |||
| 587960aebe | |||
| 4e1b6784f7 | |||
| 8b381f2640 | |||
| 0dc7fa6c34 | |||
| 2a2bf682bf | |||
| 87526129fb | |||
| 8ed1b7aa46 | |||
| 4084bd0ecc | |||
| d11eaceaf1 | |||
| 1e6986fbc5 | |||
| 11a19bdec7 | |||
| 51064f1b90 | |||
| 3385cd19e8 | |||
| 852f8517df | |||
| bb917f9818 | |||
| 10248fb29f | |||
| 446dc85bdd | |||
| 4aa2c226a9 | |||
| bf9ba8313a | |||
| 444b59c557 | |||
| b2e1df94db | |||
| b4963cabc8 | |||
| 2851024340 | |||
| 7f25a25729 | |||
| acfe23265a | |||
| 2c6fbbd7dd | |||
| f84507f513 | |||
| be6a9e4a48 | |||
| 69e7634619 | |||
| d18748aba4 | |||
| 27c4ef3410 | |||
| a7ee392d3e | |||
| 4415a6fdef | |||
| 1e1e6e96a1 | |||
| 461d1dfbcc | |||
| 3e8c923641 | |||
| 5975fafefb | |||
| 71169fd545 | |||
| be895d564d | |||
| f36a27c218 | |||
| 8cdb07f151 | |||
| ea403a0ffe | |||
| 7f0b4e66ae | |||
| 3b226965ba | |||
| 63daf77412 | |||
| df5cbe30a6 | |||
| 9e1a536778 | |||
| a1db8833ef | |||
| 95dd0e0158 | |||
| 079a1d5cc3 | |||
| 2377d1a466 | |||
| 9f9f29391e | |||
| b64716d3f7 | |||
| d7a47abe38 | |||
| 58b314a61e | |||
| 4431ec7a5e | |||
| 9542026d70 | |||
| cc4c5b64c0 | |||
| 82c2aac4a0 | |||
| a143e0f0f1 | |||
| db9775dc32 | |||
| 538c0b0740 | |||
| 21cd88caf6 | |||
| 0660d9e2a5 | |||
| 25257f49d7 | |||
| dd615f106d | |||
| 5db64d61e0 | |||
| ee5e1f94e4 | |||
| 031e926414 | |||
| 88b4b3143d | |||
| c1ce84ecec | |||
| d670011363 | |||
| c88332366b | |||
| cfee282c28 | |||
| 91b42a3539 | |||
| 02b1d176c5 | |||
| 63d072b8cc | |||
| 256d44f255 | |||
| e2a6805a31 | |||
| d46fc12079 | |||
| 5ce88f107c | |||
| 683c4addd9 | |||
| db58cf2e68 | |||
| 1cf535865a | |||
| 6042d2a3c7 | |||
| df03819e12 | |||
| 072354afb7 | |||
| 57c7369aea | |||
| f92cdf335f | |||
| 19f3c857d5 | |||
| 7f3da73aa4 | |||
| c384c2b610 | |||
| 16d7dd426a | |||
| 787b6928d9 | |||
| ddbdbc5fb5 | |||
| d0edf9fb48 | |||
| 28d4446aa7 | |||
| ab3419ab09 | |||
| 457fe1535f | |||
| 6e90b02052 | |||
| fdc2680ae8 | |||
| 35a398443a | |||
| b55ce8aa93 | |||
| 74e67ef702 | |||
| e689248919 | |||
| 5a527b3fc9 | |||
| 565cc37912 | |||
| 50e1864a85 | |||
| 37ac88fc1b | |||
| 8ed98bcb07 | |||
| b8609ec149 | |||
| 96eb603bca | |||
| 20aaf35fc4 | |||
| 151a63a118 | |||
| 9db2267445 | |||
| 69a7ef063d | |||
| 8527875f0a | |||
| 2244da07e6 | |||
| 18bf710549 | |||
| 9e2e5a3f7f | |||
| 3df7fd6dd1 | |||
| 4371c46c4c | |||
| fcf7c1275b | |||
| e6e62fa767 | |||
| 8e1cb8fb70 | |||
| 00674686cb | |||
| b350bb2e7a | |||
| e17c704a4b | |||
| 3259245780 | |||
| 63f21084b6 | |||
| ced3555248 | |||
| 27eef24611 | |||
| dcf358f27d | |||
| 40afc8c0e2 | |||
| 1dabdbf7d8 | |||
| d65397a0ba | |||
| 8c72500070 | |||
| 2a27e21e00 | |||
| 3bc52a1f2c | |||
| 9806b5a0a9 | |||
| 201cd0f5fc | |||
| 5e2e92c11a | |||
| d57657599b | |||
| 995db834b2 | |||
| b22bc8a799 | |||
| dfd22aac46 | |||
| 72f62718f1 | |||
| e938a4d154 | |||
| 641019262e | |||
| fe9056f081 | |||
| fba49b8088 | |||
| a5ae1eea30 | |||
| 6e0ee9ec32 | |||
| a5e3e10e84 | |||
| 99afbdd606 | |||
| 90c0b83c34 | |||
| 68f9dd1ce1 | |||
| 51e4b1de99 | |||
| 08f091a889 | |||
| 692e3cc56e | |||
| bcfbccc381 | |||
| 8aa8c65d0e | |||
| 635d485b69 | |||
| c0630eeebb | |||
| 8932be2d49 | |||
| 3905486240 | |||
| eedc14b13c | |||
| 44bb615eee | |||
| 541d387143 | |||
| a8ad9c10bd | |||
| f1669224da | |||
| 2a27061891 | |||
| 6c55b2de58 | |||
| 9b99855c43 | |||
| 0269e88575 | |||
| 7fbd43283d | |||
| 226c123b77 | |||
| ac271d1006 | |||
| af84425689 | |||
| 512e9c947c | |||
| e7319376a5 | |||
| 2a7b493769 | |||
| f516a0d2e4 | |||
| 62f872122c | |||
| 89737d6e00 | |||
| 6a81d54e53 | |||
| c0062746eb | |||
| 809a904bc8 | |||
| 602d27c7b0 | |||
| aad61e876f | |||
| eb0e9947f2 | |||
| 23a09cff1b | |||
| ebe9041fdc | |||
| f93ef09b58 | |||
| e74cfb93b5 | |||
| 4a44621f87 | |||
| c7acaa2f5e | |||
| 139abad1f4 | |||
| a3a5306f11 | |||
| fb1c3bc446 | |||
| aaf344a4dd | |||
| 62ca9c0ed2 | |||
| dc8be8740d | |||
| d9bcf4df92 | |||
| 7ceb94f9c2 | |||
| 2e5becb4fb | |||
| 5e12f568bd | |||
| 80382c0bf9 | |||
| 91150d4150 | |||
| 6bfc38db53 | |||
| 95b99db199 | |||
| 1b13395e65 | |||
| fe21904b53 | |||
| ab0d666f03 | |||
| 30add7a765 | |||
| 83971a1913 | |||
| 2f62081683 | |||
| c7eb81dfa4 | |||
| 9f35f526e0 | |||
| e755a63250 | |||
| 29c6b62ba1 | |||
| 9d69903c36 | |||
| 51475a9290 | |||
| a9e794bde9 | |||
| 5114a7aa27 | |||
| d14042e536 | |||
| 7819fca349 | |||
| 68d9cfb550 | |||
| 1b7fd95214 | |||
| 0a1e6ccf9a | |||
| 0db3f415a8 | |||
| 8a1385b9d0 | |||
| a52143b0ef | |||
| 75ec41c85a | |||
| 827c8b3c48 | |||
| 194b35d889 | |||
| 1b33523537 | |||
| 807b95597a | |||
| 14b1ffa413 | |||
| d1db4d5534 | |||
| a45c0e537f | |||
| 4dab9b8fa3 | |||
| a84f8ba5d6 | |||
| f6f5cab661 | |||
| 618f563ce9 | |||
| 5b49c90538 | |||
| 41be0003f1 | |||
| 8f8ee28ba0 | |||
| b3ae7fbb49 | |||
| 837854de1e | |||
| 8cc1f0726f | |||
| e1d617ef70 | |||
| 5f199d68f9 | |||
| b8cca2db97 | |||
| 35e959219d | |||
| 08d466faee | |||
| 0b5823f451 | |||
| c77b150c28 | |||
| 3cf27bb838 | |||
| 26a90435c7 | |||
| f6efaba906 | |||
| ff0e831da9 | |||
| 96bb65723a | |||
| 33ac4bc424 | |||
| 698503b467 | |||
| 0657525d40 | |||
| 064d0de531 | |||
| 471bf36a7b | |||
| cb7d2b4040 | |||
| 6032cbcf45 | |||
| 73785d7552 | |||
| 431b5ffa59 | |||
| c0500a0d4d | |||
| 5300534188 | |||
| 02192a5f53 | |||
| 2a98d5b8ee | |||
| 4f495b5fc6 | |||
| b75e2d23a2 | |||
| 5261cdc794 | |||
| b179f61c6f | |||
| 71b245ad6f | |||
| 5b070cf87a | |||
| b8afe0b364 | |||
| 92b4ec48f7 | |||
| 6a69ac997d | |||
| 8c542c30a9 | |||
| 5c59f93138 | |||
| 4a5591be75 | |||
| e756764398 | |||
| 568b9c3a4c | |||
| 13a4aa5212 | |||
| a8388c841f | |||
| 87f1f59855 | |||
| c8c67d2a3d | |||
| a042fa0b9a | |||
| b68d870599 | |||
| 2c63f10dca | |||
| 7b8e2d0dc7 | |||
| 5bb55bcc7d | |||
| 08c49b0d5f | |||
| 5b07c8adc6 | |||
| ca7e61c701 | |||
| 6795df10bd | |||
| 1e98a35953 | |||
| 2ab3fedf8f | |||
| 915fc33dd7 | |||
| c79a5359b1 | |||
| 632f176cdd | |||
| 99e7857ac8 | |||
| 9ff3837e49 | |||
| 6c91d0da5a | |||
| 12dd3c5eea | |||
| 04da822826 | |||
| 40a8f0775e | |||
| 65aaebe2b5 | |||
| 769559279f | |||
| bb7fd38c46 | |||
| a734927a42 | |||
| e21eca2a16 | |||
| 33c8c2fe47 | |||
| c3048858e9 | |||
| 259fe63ceb | |||
| d1aa3b7982 | |||
| e4af7b3a53 | |||
| 51bd392fed | |||
| 9bc4a2c564 | |||
| 550d28388a | |||
| e073b4f81b | |||
| fc0fdb5e37 | |||
| 9d6b2ed937 | |||
| 86468b9552 | |||
| 8c1b76f3c3 | |||
| 6fc6a499ec | |||
| 293b83c3df | |||
| 99df58f6d2 | |||
| 454f3f84b2 | |||
| 2d558c3963 | |||
| 055b49936a | |||
| 48289c3c5a | |||
| 0a09de2ed7 | |||
| f7a57ca3e2 | |||
| cfa93a78a3 | |||
| e4e616ee56 | |||
| 5cf2d243f0 | |||
| 0a35c4f1c7 | |||
| 4b94ff7492 | |||
| aacc0b47c0 | |||
| b526a2d9cf | |||
| af32450eca | |||
| 8664f73855 |
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"llamaindex": patch
|
||||
---
|
||||
|
||||
Add PapaCSVReader (thank you @swk777)
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"llamaindex": patch
|
||||
---
|
||||
|
||||
OpenAI v4 (final), Anthropic 0.6, Replicate 0.16.1
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"llamaindex": patch
|
||||
---
|
||||
|
||||
Breaking: Removed NodeWithEmbeddings (just use BaseNode)
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"decorators": true
|
||||
},
|
||||
"target": "esnext",
|
||||
"transform": {
|
||||
"decoratorVersion": "2022-03"
|
||||
}
|
||||
},
|
||||
"module": {
|
||||
"type": "commonjs",
|
||||
"ignoreDynamic": true
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
// This tells ESLint to load the config from the package `eslint-config-custom`
|
||||
extends: ["custom"],
|
||||
settings: {
|
||||
next: {
|
||||
rootDir: ["apps/*/"],
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
examples/readers/data/** binary
|
||||
examples/data/** binary
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ""
|
||||
labels: bug
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Code to reproduce the behavior:
|
||||
|
||||
```ts
|
||||
// paste the code here
|
||||
```
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
|
||||
- OS: [e.g. macOS, Linux]
|
||||
- JS Runtime / Framework / Bundler (select all applicable)
|
||||
- [ ] Node.js
|
||||
- [ ] Deno
|
||||
- [ ] Bun
|
||||
- [ ] Next.js
|
||||
- [ ] ESBuild
|
||||
- [ ] Rollup
|
||||
- [ ] Webpack
|
||||
- [ ] Turbopack
|
||||
- [ ] Vite
|
||||
- [ ] Waku
|
||||
- [ ] Edge Runtime
|
||||
- [ ] AWS Lambda
|
||||
- [ ] Cloudflare Worker
|
||||
- [ ] Others (please elaborate on this)
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -1,11 +1,10 @@
|
||||
name: Bugfix
|
||||
title: 'Sweep: '
|
||||
description: Write something like "We notice ... behavior when ... happens instead of ...""
|
||||
labels: sweep
|
||||
title: ""
|
||||
description: Write something like "We notice ... behavior when ... happens instead of ..." If you would like to use sweep.dev prefix with "Sweep:"
|
||||
body:
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Details
|
||||
description: More details about the bug
|
||||
placeholder: The bug might be in ... file
|
||||
placeholder: The bug might be in ... file
|
||||
@@ -1,11 +1,10 @@
|
||||
name: Feature Request
|
||||
title: 'Sweep: '
|
||||
description: Write something like "Write an api endpoint that does "..." in the "..." file"
|
||||
labels: sweep
|
||||
title: ""
|
||||
description: Write something like "Write an api endpoint that does "..." in the "..." file". If you would like to use sweep.dev prefix with "Sweep:"
|
||||
body:
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Details
|
||||
description: More details for Sweep
|
||||
placeholder: The new endpoint should use the ... class from ... file because it contains ... logic
|
||||
description: More details
|
||||
placeholder: The new endpoint should use the ... class from ... file because it contains ... logic
|
||||
@@ -1,11 +1,10 @@
|
||||
name: Refactor
|
||||
title: 'Sweep: '
|
||||
description: Write something like "Modify the ... api endpoint to use ... version and ... framework"
|
||||
labels: sweep
|
||||
title: ""
|
||||
description: Write something like "Modify the ... api endpoint to use ... version and ... framework" If you would like to use sweep.dev prefix with "Sweep:"
|
||||
body:
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Details
|
||||
description: More details for Sweep
|
||||
placeholder: We are migrating this function to ... version because ...
|
||||
description: More details
|
||||
placeholder: We are migrating this function to ... version because ...
|
||||
@@ -12,14 +12,16 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install pnpm
|
||||
run: npm install -g pnpm
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "pnpm"
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Run lint
|
||||
run: pnpm run lint
|
||||
run: pnpm run lint
|
||||
- name: Run Prettier
|
||||
run: pnpm run format
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Publish Preview
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
pre_release:
|
||||
name: Pre Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
|
||||
- name: Pre Release
|
||||
run: pnpx pkg-pr-new publish ./packages/* ./packages/providers/*
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Publish to GitHub Releases
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "llamaindex@*"
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build tarball
|
||||
run: |
|
||||
pnpm pack
|
||||
working-directory: packages/llamaindex
|
||||
|
||||
- name: Create release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "packages/llamaindex/llamaindex-*.tgz"
|
||||
name: Release ${{ github.ref }}
|
||||
bodyFile: "packages/llamaindex/CHANGELOG.md"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,70 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Add auth token to .npmrc file
|
||||
run: |
|
||||
cat << EOF >> ".npmrc"
|
||||
//registry.npmjs.org/:_authToken=$NPM_TOKEN
|
||||
EOF
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Get changeset status
|
||||
id: get-changeset-status
|
||||
run: |
|
||||
pnpm changeset status --output .changeset/status.json
|
||||
new_version=$(jq -r '.releases[] | select(.name == "llamaindex") | .newVersion' < .changeset/status.json)
|
||||
rm -v .changeset/status.json
|
||||
echo "new-version=${new_version}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Create Release Pull Request or Publish to npm
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
with:
|
||||
commit: Release ${{ steps.get-changeset-status.outputs.new-version }}
|
||||
title: Release ${{ steps.get-changeset-status.outputs.new-version }}
|
||||
# update version PR with the latest changesets
|
||||
version: pnpm new-version
|
||||
# build package and call changeset publish
|
||||
publish: pnpm release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
# Refs: https://github.com/changesets/changesets/issues/421
|
||||
- name: Update lock file
|
||||
continue-on-error: true
|
||||
run: pnpm install --lockfile-only
|
||||
|
||||
- name: Commit lock file
|
||||
continue-on-error: true
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "chore: update lock file"
|
||||
branch: changeset-release/main
|
||||
file_pattern: "pnpm-lock.yaml"
|
||||
+163
-14
@@ -1,24 +1,173 @@
|
||||
name: Run Tests
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
||||
TURBO_REMOTE_ONLY: true
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: [20.x, 22.x, 23.x]
|
||||
name: E2E on Node.js ${{ matrix.node-version }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ankane/setup-postgres@v1
|
||||
with:
|
||||
database: llamaindex_node_test
|
||||
dev-files: true
|
||||
- run: |
|
||||
cd /tmp
|
||||
git clone --branch v0.7.0 https://github.com/pgvector/pgvector.git
|
||||
cd pgvector
|
||||
make
|
||||
sudo make install
|
||||
- uses: pnpm/action-setup@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: "pnpm"
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Run E2E Tests
|
||||
run: pnpm run e2e
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: [20.x, 22.x, 23.x]
|
||||
name: Test on Node.js ${{ matrix.node-version }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: "pnpm"
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Run tests
|
||||
run: pnpm run test
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "pnpm"
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
- name: Use Build For Examples
|
||||
run: |
|
||||
pnpm link ../packages/llamaindex/
|
||||
cd readers && pnpm link ../../packages/llamaindex/
|
||||
working-directory: ./examples
|
||||
- name: Run Type Check
|
||||
run: pnpm run type-check
|
||||
- name: Run Circular Dependency Check
|
||||
run: pnpm run circular-check
|
||||
e2e-llamaindex-examples:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
packages:
|
||||
- cloudflare-worker-agent
|
||||
- nextjs-agent
|
||||
- nextjs-edge-runtime
|
||||
- nextjs-node-runtime
|
||||
- waku-query-engine
|
||||
- llama-parse-browser
|
||||
runs-on: ubuntu-latest
|
||||
name: Build LlamaIndex Example (${{ matrix.packages }})
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "pnpm"
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Build llamaindex
|
||||
run: pnpm run build
|
||||
- name: Build ${{ matrix.packages }}
|
||||
run: pnpm run build
|
||||
working-directory: e2e/examples/${{ matrix.packages }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '18'
|
||||
typecheck-examples:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm i -g pnpm
|
||||
pnpm install
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm run test
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "pnpm"
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
- name: Copy examples
|
||||
run: rsync -rv --exclude=node_modules ./examples ${{ runner.temp }}
|
||||
- name: Pack packages
|
||||
run: |
|
||||
for dir in packages/*; do
|
||||
if [ -d "$dir" ] && [ -f "$dir/package.json" ] && [[ ! "$dir" =~ autotool ]]; then
|
||||
echo "Packing $dir"
|
||||
pnpm pack --pack-destination ${{ runner.temp }} -C $dir
|
||||
else
|
||||
echo "Skipping $dir, no package.json found"
|
||||
fi
|
||||
done
|
||||
- name: Pack provider packages
|
||||
run: |
|
||||
for dir in packages/providers/*; do
|
||||
if [ -d "$dir" ] && [ -f "$dir/package.json" ]; then
|
||||
echo "Packing $dir"
|
||||
pnpm pack --pack-destination ${{ runner.temp }} -C $dir
|
||||
else
|
||||
echo "Skipping $dir, no package.json found"
|
||||
fi
|
||||
done
|
||||
- name: Install
|
||||
run: npm add ${{ runner.temp }}/*.tgz
|
||||
working-directory: ${{ runner.temp }}/examples
|
||||
- name: Run Type Check
|
||||
run: npx tsc --project ./tsconfig.json
|
||||
working-directory: ${{ runner.temp }}/examples
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: build-dist
|
||||
path: |
|
||||
${{ runner.temp }}/*.tgz
|
||||
if-no-files-found: error
|
||||
|
||||
+15
@@ -3,6 +3,7 @@
|
||||
# dependencies
|
||||
node_modules
|
||||
.pnp
|
||||
.pnpm-store
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
@@ -36,3 +37,17 @@ yarn-error.log*
|
||||
.vercel
|
||||
|
||||
dist/
|
||||
lib/
|
||||
|
||||
.cache
|
||||
test-results/
|
||||
playwright-report/
|
||||
blob-report/
|
||||
playwright/.cache/
|
||||
.tsbuildinfo
|
||||
|
||||
# intellij
|
||||
**/.idea
|
||||
|
||||
# generated API
|
||||
packages/cloud/src/client
|
||||
|
||||
+2
-3
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
pnpm format
|
||||
pnpm lint
|
||||
npx lint-staged
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
pnpm test
|
||||
@@ -1 +1,5 @@
|
||||
auto-install-peers = true
|
||||
enable-pre-post-scripts = true
|
||||
prefer-workspace-packages = true
|
||||
save-workspace-protocol = true
|
||||
link-workspace-packages = true
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
apps/docs/i18n
|
||||
apps/docs/docs/api
|
||||
pnpm-lock.yaml
|
||||
lib/
|
||||
dist/
|
||||
.docusaurus/
|
||||
.source/
|
||||
# prttier doesn't support mdx3 we are using
|
||||
*.mdx
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"decorators": true
|
||||
},
|
||||
"target": "esnext",
|
||||
"transform": {
|
||||
"decoratorVersion": "2022-03"
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Debug Example",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"runtimeExecutable": "pnpm",
|
||||
"console": "integratedTerminal",
|
||||
"cwd": "${workspaceFolder}/examples",
|
||||
"runtimeArgs": ["npx", "tsx", "${file}"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+11
-1
@@ -4,5 +4,15 @@
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"[xml]": {
|
||||
"editor.defaultFormatter": "redhat.vscode-xml"
|
||||
}
|
||||
},
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.black-formatter"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"prettier.prettierPath": "./node_modules/prettier"
|
||||
}
|
||||
|
||||
+48
-56
@@ -2,79 +2,71 @@
|
||||
|
||||
## Structure
|
||||
|
||||
This is a monorepo built with Turborepo
|
||||
LlamaIndex.TS uses pnpm monorepo.
|
||||
|
||||
Right now there are two packages of importance:
|
||||
We recommend you to understand the basics of Node.js, TypeScript, pnpm, and of course, LLM before contributing.
|
||||
|
||||
packages/core which is the main NPM library llamaindex
|
||||
There are some important folders in the repository:
|
||||
|
||||
apps/simple is where the demo code lives
|
||||
|
||||
### Turborepo docs
|
||||
|
||||
You can checkout how Turborepo works using the default [README-turborepo.md](/README-turborepo.md)
|
||||
- `packages/*`: Contains the source code of the packages. Each package is a separate npm package.
|
||||
- `llamaindex`: The starter package for LlamaIndex.TS, which contains the all sub-packages.
|
||||
- `core`: The core package of LlamaIndex.TS, which contains the abstract classes and interfaces. It is designed for
|
||||
all JS runtime environments.
|
||||
- `env`: The environment package of LlamaIndex.TS, which contains the environment-specific classes and interfaces. It
|
||||
includes compatibility layers for Node.js, Deno, Vercel Edge Runtime, Cloudflare Workers...
|
||||
- `apps/*`: The applications based on LlamaIndex.TS.
|
||||
- `next`: Our documentation website based on Next.js.
|
||||
- `examples`: The code examples of LlamaIndex.TS using Node.js.
|
||||
|
||||
## Getting Started
|
||||
|
||||
Install NodeJS. Preferably v18 using nvm or n.
|
||||
|
||||
Inside the LlamaIndexTS directory:
|
||||
Make sure you have Node.js LIS (Long-term Support) installed. You can check your Node.js version by running:
|
||||
|
||||
```shell
|
||||
node -v
|
||||
# v20.x.x
|
||||
```
|
||||
npm i -g pnpm ts-node
|
||||
|
||||
### Use pnpm
|
||||
|
||||
```shell
|
||||
corepack enable
|
||||
```
|
||||
|
||||
### Install dependencies
|
||||
|
||||
```shell
|
||||
pnpm install
|
||||
```
|
||||
|
||||
Note: we use pnpm in this repo, which has a lot of the same functionality and CLI options as npm but it does do some things better in a monorepo, like centralizing dependencies and caching.
|
||||
### Build the packages
|
||||
|
||||
PNPM's has documentation on its [workspace feature](https://pnpm.io/workspaces) and Turborepo had some [useful documentation also](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks).
|
||||
|
||||
### Running Typescript
|
||||
|
||||
When we publish to NPM we will have a tsc compiled version of the library in JS. For now, the easiest thing to do is use ts-node.
|
||||
|
||||
### Test cases
|
||||
|
||||
To run them, run
|
||||
|
||||
```
|
||||
pnpm run test
|
||||
```
|
||||
|
||||
To write new test cases write them in [packages/core/src/tests](/packages/core/src/tests)
|
||||
|
||||
We use Jest https://jestjs.io/ to write our test cases. Jest comes with a bunch of built in assertions using the expect function: https://jestjs.io/docs/expect
|
||||
|
||||
### Demo applications
|
||||
|
||||
There is an existing ["simple"](/apps/simple/README.md) demos folder with mainly NodeJS scripts. Feel free to add additional demos to that folder. If you would like to try out your changes in the core package with a new demo, you need to run the build command in the README.
|
||||
|
||||
You can create new demo applications in the apps folder. Just run pnpm init in the folder after you create it to create its own package.json
|
||||
|
||||
### Installing packages
|
||||
|
||||
To install packages for a specific package or demo application, run
|
||||
|
||||
```
|
||||
pnpm add [NPM Package] --filter [package or application i.e. core or simple]
|
||||
```
|
||||
|
||||
To install packages for every package or application run
|
||||
|
||||
```
|
||||
pnpm add -w [NPM Package]
|
||||
```shell
|
||||
# Build all packages
|
||||
turbo build --filter "./packages/*"
|
||||
```
|
||||
|
||||
### Docs
|
||||
|
||||
To contribute to the docs, go to the docs website folder and run the Docusaurus instance.
|
||||
See the [docs](./apps/next/README.md) for more information.
|
||||
|
||||
```bash
|
||||
cd apps/docs
|
||||
pnpm install
|
||||
pnpm start
|
||||
## Changeset
|
||||
|
||||
We use [changesets](https://github.com/changesets/changesets) for managing versions and changelogs. To create a new
|
||||
changeset, run in the root folder:
|
||||
|
||||
```
|
||||
pnpm changeset
|
||||
```
|
||||
|
||||
That should start a webserver which will serve the docs on https://localhost:3000
|
||||
Please send a descriptive changeset for each PR.
|
||||
|
||||
Any changes you make should be reflected in the browser. If you need to regenerate the API docs and find that your TSDoc isn't getting the updates, feel free to remove apps/docs/api. It will automatically regenerate itself when you run pnpm start again.
|
||||
## Publishing (maintainers only)
|
||||
|
||||
The [Release Github Action](.github/workflows/release.yml) is automatically generating and updating a
|
||||
PR called "Release {version}".
|
||||
|
||||
This PR will update the `package.json` and `CHANGELOG.md` files of each package according to
|
||||
the current changesets in the [.changeset](.changeset) folder.
|
||||
|
||||
If this PR is merged it will automatically add version tags to the repository and publish the updated packages to NPM.
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
# Turborepo starter
|
||||
|
||||
This is an official starter Turborepo.
|
||||
|
||||
## Using this example
|
||||
|
||||
Run the following command:
|
||||
|
||||
```sh
|
||||
npx create-turbo@latest
|
||||
```
|
||||
|
||||
## What's inside?
|
||||
|
||||
This Turborepo includes the following packages/apps:
|
||||
|
||||
### Apps and Packages
|
||||
|
||||
- `docs`: a [Next.js](https://nextjs.org/) app
|
||||
- `web`: another [Next.js](https://nextjs.org/) app
|
||||
- `ui`: a stub React component library shared by both `web` and `docs` applications
|
||||
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
|
||||
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
|
||||
|
||||
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
|
||||
|
||||
### Utilities
|
||||
|
||||
This Turborepo has some additional tools already setup for you:
|
||||
|
||||
- [TypeScript](https://www.typescriptlang.org/) for static type checking
|
||||
- [ESLint](https://eslint.org/) for code linting
|
||||
- [Prettier](https://prettier.io) for code formatting
|
||||
|
||||
### Build
|
||||
|
||||
To build all apps and packages, run the following command:
|
||||
|
||||
```
|
||||
cd my-turborepo
|
||||
pnpm build
|
||||
```
|
||||
|
||||
### Develop
|
||||
|
||||
To develop all apps and packages, run the following command:
|
||||
|
||||
```
|
||||
cd my-turborepo
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
### Remote Caching
|
||||
|
||||
Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
|
||||
|
||||
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
|
||||
|
||||
```
|
||||
cd my-turborepo
|
||||
npx turbo login
|
||||
```
|
||||
|
||||
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
|
||||
|
||||
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
|
||||
|
||||
```
|
||||
npx turbo link
|
||||
```
|
||||
|
||||
## Useful Links
|
||||
|
||||
Learn more about the power of Turborepo:
|
||||
|
||||
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
|
||||
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
|
||||
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
|
||||
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
|
||||
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
|
||||
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
|
||||
@@ -1,68 +1,107 @@
|
||||
# LlamaIndex.TS
|
||||
<p align="center">
|
||||
<img height="100" width="100" alt="LlamaIndex logo" src="https://ts.llamaindex.ai/square.svg" />
|
||||
</p>
|
||||
<h1 align="center">LlamaIndex.TS</h1>
|
||||
<h3 align="center">
|
||||
Data framework for your LLM application.
|
||||
</h3>
|
||||
|
||||
LlamaIndex is a data framework for your LLM application.
|
||||
[](https://www.npmjs.com/package/llamaindex)
|
||||
[](https://www.npmjs.com/package/llamaindex)
|
||||
[](https://www.npmjs.com/package/llamaindex)
|
||||
[](https://discord.com/invite/eN6D2HQ4aX)
|
||||
|
||||
Use your own data with large language models (LLMs, OpenAI ChatGPT and others) in Typescript and Javascript.
|
||||
Use your own data with large language models (LLMs, OpenAI ChatGPT and others) in JS runtime environments with TypeScript support.
|
||||
|
||||
Documentation: https://ts.llamaindex.ai/
|
||||
|
||||
Try examples online:
|
||||
|
||||
[](https://stackblitz.com/github/run-llama/LlamaIndexTS/tree/main/examples)
|
||||
|
||||
## What is LlamaIndex.TS?
|
||||
|
||||
LlamaIndex.TS aims to be a lightweight, easy to use set of libraries to help you integrate large language models into your applications with your own data.
|
||||
|
||||
## Getting started with an example:
|
||||
## Compatibility
|
||||
|
||||
LlamaIndex.TS requries Node v18 or higher. You can download it from https://nodejs.org or use https://nvm.sh (our preferred option).
|
||||
### Multiple JS Environment Support
|
||||
|
||||
In a new folder:
|
||||
LlamaIndex.TS supports multiple JS environments, including:
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY="sk-......" # Replace with your key from https://platform.openai.com/account/api-keys
|
||||
pnpm init
|
||||
pnpm install typescript
|
||||
pnpm exec tsc –-init # if needed
|
||||
- Node.js >= 20 ✅
|
||||
- Deno ✅
|
||||
- Bun ✅
|
||||
- Nitro ✅
|
||||
- Vercel Edge Runtime ✅ (with some limitations)
|
||||
- Cloudflare Workers ✅ (with some limitations)
|
||||
|
||||
For now, browser support is limited due to the lack of support for [AsyncLocalStorage-like APIs](https://github.com/tc39/proposal-async-context)
|
||||
|
||||
### Supported LLMs:
|
||||
|
||||
- OpenAI LLms
|
||||
- Anthropic LLms
|
||||
- Groq LLMs
|
||||
- Llama2, Llama3, Llama3.1 LLMs
|
||||
- MistralAI LLMs
|
||||
- Fireworks LLMs
|
||||
- DeepSeek LLMs
|
||||
- ReplicateAI LLMs
|
||||
- TogetherAI LLMs
|
||||
- HuggingFace LLms
|
||||
- DeepInfra LLMs
|
||||
- Gemini LLMs
|
||||
|
||||
## Getting started
|
||||
|
||||
```shell
|
||||
npm install llamaindex
|
||||
pnpm install llamaindex
|
||||
pnpm install @types/node
|
||||
yarn add llamaindex
|
||||
```
|
||||
|
||||
Create the file example.ts
|
||||
### Setup in Node.js, Deno, Bun, TypeScript...?
|
||||
|
||||
```ts
|
||||
// example.ts
|
||||
import fs from "fs/promises";
|
||||
import { Document, VectorStoreIndex } from "llamaindex";
|
||||
See our official document: <https://ts.llamaindex.ai/docs/llamaindex/setup/getting-started>
|
||||
|
||||
async function main() {
|
||||
// Load essay from abramov.txt in Node
|
||||
const essay = await fs.readFile(
|
||||
"node_modules/llamaindex/examples/abramov.txt",
|
||||
"utf-8"
|
||||
);
|
||||
### Tips when using in non-Node.js environments
|
||||
|
||||
// Create Document object with essay
|
||||
const document = new Document({ text: essay });
|
||||
When you are importing `llamaindex` in a non-Node.js environment(such as Vercel Edge, Cloudflare Workers, etc.)
|
||||
Some classes are not exported from top-level entry file.
|
||||
|
||||
// Split text and create embeddings. Store them in a VectorStoreIndex
|
||||
const index = await VectorStoreIndex.fromDocuments([document]);
|
||||
The reason is that some classes are only compatible with Node.js runtime,(e.g. `PDFReader`) which uses Node.js specific APIs(like `fs`, `child_process`, `crypto`).
|
||||
|
||||
// Query the index
|
||||
const queryEngine = index.asQueryEngine();
|
||||
const response = await queryEngine.query(
|
||||
"What did the author do in college?"
|
||||
);
|
||||
If you need any of those classes, you have to import them instead directly though their file path in the package.
|
||||
Here's an example for importing the `PineconeVectorStore` class:
|
||||
|
||||
// Output response
|
||||
console.log(response.toString());
|
||||
```typescript
|
||||
import { PineconeVectorStore } from "llamaindex/storage/vectorStore/PineconeVectorStore";
|
||||
```
|
||||
|
||||
As the `PDFReader` is not working with the Edge runtime, here's how to use the `SimpleDirectoryReader` with the `LlamaParseReader` to load PDFs:
|
||||
|
||||
```typescript
|
||||
import { SimpleDirectoryReader } from "llamaindex/readers/SimpleDirectoryReader";
|
||||
import { LlamaParseReader } from "llamaindex/readers/LlamaParseReader";
|
||||
|
||||
export const DATA_DIR = "./data";
|
||||
|
||||
export async function getDocuments() {
|
||||
const reader = new SimpleDirectoryReader();
|
||||
// Load PDFs using LlamaParseReader
|
||||
return await reader.loadData({
|
||||
directoryPath: DATA_DIR,
|
||||
fileExtToReader: {
|
||||
pdf: new LlamaParseReader({ resultType: "markdown" }),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
Then you can run it using
|
||||
> _Note_: Reader classes have to be added explictly to the `fileExtToReader` map in the Edge version of the `SimpleDirectoryReader`.
|
||||
|
||||
```bash
|
||||
pnpm dlx ts-node example.ts
|
||||
```
|
||||
You'll find a complete example with LlamaIndexTS here: https://github.com/run-llama/create_llama_projects/tree/main/nextjs-edge-llamaparse
|
||||
|
||||
## Playground
|
||||
|
||||
@@ -70,30 +109,25 @@ Check out our NextJS playground at https://llama-playground.vercel.app/. The sou
|
||||
|
||||
## Core concepts for getting started:
|
||||
|
||||
- [Document](/packages/core/src/Node.ts): A document represents a text file, PDF file or other contiguous piece of data.
|
||||
- [Document](/packages/llamaindex/src/Node.ts): A document represents a text file, PDF file or other contiguous piece of data.
|
||||
|
||||
- [Node](/packages/core/src/Node.ts): The basic data building block. Most commonly, these are parts of the document split into manageable pieces that are small enough to be fed into an embedding model and LLM.
|
||||
- [Node](/packages/llamaindex/src/Node.ts): The basic data building block. Most commonly, these are parts of the document split into manageable pieces that are small enough to be fed into an embedding model and LLM.
|
||||
|
||||
- [Embedding](/packages/core/src/Embedding.ts): Embeddings are sets of floating point numbers which represent the data in a Node. By comparing the similarity of embeddings, we can derive an understanding of the similarity of two pieces of data. One use case is to compare the embedding of a question with the embeddings of our Nodes to see which Nodes may contain the data needed to answer that quesiton.
|
||||
- [Embedding](/packages/llamaindex/src/embeddings/OpenAIEmbedding.ts): Embeddings are sets of floating point numbers which represent the data in a Node. By comparing the similarity of embeddings, we can derive an understanding of the similarity of two pieces of data. One use case is to compare the embedding of a question with the embeddings of our Nodes to see which Nodes may contain the data needed to answer that question. Because the default service context is OpenAI, the default embedding is `OpenAIEmbedding`. If using different models, say through Ollama, use this [Embedding](/packages/llamaindex/src/embeddings/OllamaEmbedding.ts) (see all [here](/packages/llamaindex/src/embeddings)).
|
||||
|
||||
- [Indices](/packages/core/src/indices/): Indices store the Nodes and the embeddings of those nodes. QueryEngines retrieve Nodes from these Indices using embedding similarity.
|
||||
- [Indices](/packages/llamaindex/src/indices/): Indices store the Nodes and the embeddings of those nodes. QueryEngines retrieve Nodes from these Indices using embedding similarity.
|
||||
|
||||
- [QueryEngine](/packages/core/src/QueryEngine.ts): Query engines are what generate the query you put in and give you back the result. Query engines generally combine a pre-built prompt with selected Nodes from your Index to give the LLM the context it needs to answer your query.
|
||||
- [QueryEngine](/packages/llamaindex/src/engines/query/RetrieverQueryEngine.ts): Query engines are what generate the query you put in and give you back the result. Query engines generally combine a pre-built prompt with selected Nodes from your Index to give the LLM the context it needs to answer your query. To build a query engine from your Index (recommended), use the [`asQueryEngine`](/packages/llamaindex/src/indices/BaseIndex.ts) method on your Index. See all query engines [here](/packages/llamaindex/src/engines/query).
|
||||
|
||||
- [ChatEngine](/packages/core/src/ChatEngine.ts): A ChatEngine helps you build a chatbot that will interact with your Indices.
|
||||
- [ChatEngine](/packages/llamaindex/src/engines/chat/SimpleChatEngine.ts): A ChatEngine helps you build a chatbot that will interact with your Indices. See all chat engines [here](/packages/llamaindex/src/engines/chat).
|
||||
|
||||
- [SimplePrompt](/packages/core/src/Prompt.ts): A simple standardized function call definition that takes in inputs and formats them in a template literal. SimplePrompts can be specialized using currying and combined using other SimplePrompt functions.
|
||||
|
||||
## Supported LLMs:
|
||||
|
||||
- OpenAI GPT-3.5-turbo and GPT-4
|
||||
- Anthropic Claude Instant and Claude 2
|
||||
- Llama2 Chat LLMs (70B, 13B, and 7B parameters)
|
||||
- [SimplePrompt](/packages/llamaindex/src/Prompt.ts): A simple standardized function call definition that takes in inputs and formats them in a template literal. SimplePrompts can be specialized using currying and combined using other SimplePrompt functions.
|
||||
|
||||
## Contributing:
|
||||
|
||||
We are in the very early days of LlamaIndex.TS. If you’re interested in hacking on it with us check out our [contributing guide](/CONTRIBUTING.md)
|
||||
Please see our [contributing guide](CONTRIBUTING.md) for more information.
|
||||
You are highly encouraged to contribute to LlamaIndex.TS!
|
||||
|
||||
## Bugs? Questions?
|
||||
## Community
|
||||
|
||||
Please join our Discord! https://discord.com/invite/eN6D2HQ4aX
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"llamaindex": minor
|
||||
"docs": minor
|
||||
---
|
||||
|
||||
Add deepseek llm class
|
||||
@@ -7,6 +7,7 @@
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
lib
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,3 @@
|
||||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
|
||||
};
|
||||
|
||||
@@ -0,0 +1,493 @@
|
||||
---
|
||||
title: LlamaIndexTS v0.3.0
|
||||
description: This is my first post on Docusaurus.
|
||||
slug: welcome-llamaindexts-v0.3
|
||||
authors:
|
||||
- name: Alex Yang
|
||||
title: LlamaIndexTS maintainer, Node.js Member
|
||||
url: https://github.com/himself65
|
||||
image_url: https://github.com/himself65.png
|
||||
tags: [llamaindex, agent]
|
||||
hide_table_of_contents: false
|
||||
---
|
||||
|
||||
- [What's new in LlamaIndexTS v0.3.0](#whats-new-in-llamaindexts-v030)
|
||||
- [Improvement in LlamaIndexTS v0.3.0](#improvement-in-llamaindexts-v030)
|
||||
- [What's the next?](#whats-the-next)
|
||||
|
||||
## What's new in LlamaIndexTS v0.3.0
|
||||
|
||||
## Agents
|
||||
|
||||
In this release, we've not only ported the Agent module from the LlamaIndex Python version but have significantly
|
||||
enhanced it to be more powerful and user-friendly for JavaScript/TypeScript applications.
|
||||
|
||||
Starting from v0.3.0, we are introducing multiple agents specifically designed for RAG applications, including:
|
||||
|
||||
- `OpenAIAgent`
|
||||
- `AnthropicAgent`
|
||||
- `ReActAgent`:
|
||||
|
||||
```ts
|
||||
import { OpenAIAgent } from "llamaindex";
|
||||
import { tools } from "./tools";
|
||||
|
||||
const agent = new OpenAIAgent({
|
||||
tools: [...tools],
|
||||
});
|
||||
const { response } = await agent.chat({
|
||||
message: "What is weather today?",
|
||||
stream: false,
|
||||
});
|
||||
|
||||
console.log(response.message.content);
|
||||
```
|
||||
|
||||
We are also introducing the abstract AgentRunner class, which allows you to create your own agent by simply implementing
|
||||
the task handler.
|
||||
|
||||
```ts
|
||||
import { AgentRunner, OpenAI } from "llamaindex";
|
||||
|
||||
class MyLLM extends OpenAI {}
|
||||
|
||||
export class MyAgentWorker extends AgentWorker<MyLLM> {
|
||||
taskHandler = MyAgent.taskHandler;
|
||||
}
|
||||
|
||||
export class MyAgent extends AgentRunner<MyLLM> {
|
||||
constructor(params: Params) {
|
||||
super({
|
||||
llm: params.llm,
|
||||
chatHistory: params.chatHistory ?? [],
|
||||
systemPrompt: params.systemPrompt ?? null,
|
||||
runner: new MyAgentWorker(),
|
||||
tools:
|
||||
"tools" in params
|
||||
? params.tools
|
||||
: params.toolRetriever.retrieve.bind(params.toolRetriever),
|
||||
});
|
||||
}
|
||||
|
||||
// create store is a function to create a store for each task, by default it only includes `messages` and `toolOutputs`
|
||||
createStore = AgentRunner.defaultCreateStore;
|
||||
|
||||
static taskHandler: TaskHandler<Anthropic> = async (step, enqueueOutput) => {
|
||||
const { llm, stream } = step.context;
|
||||
// initialize the input
|
||||
const response = await llm.chat({
|
||||
stream,
|
||||
messages: step.context.store.messages,
|
||||
});
|
||||
// store the response for next task step
|
||||
step.context.store.messages = [
|
||||
...step.context.store.messages,
|
||||
response.message,
|
||||
];
|
||||
// your logic here to decide whether to continue the task
|
||||
const shouldContinue = Math.random(); /* <-- replace with your logic here */
|
||||
enqueueOutput({
|
||||
taskStep: step,
|
||||
output: response,
|
||||
isLast: !shouldContinue,
|
||||
});
|
||||
if (shouldContinue) {
|
||||
const content = await someHeavyFunctionCall();
|
||||
// if you want to continue the task, you can insert your new context for the next task step
|
||||
step.context.store.messages = [
|
||||
...step.context.store.messages,
|
||||
{
|
||||
content,
|
||||
role: "user",
|
||||
},
|
||||
];
|
||||
}
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
### Web Stream API for Streaming response
|
||||
|
||||
Web Stream is a web standard utilized in many modern web frameworks and libraries (like React 19, Deno, Node 22). We
|
||||
have migrated streaming responses to Web Stream to ensure broader compatibility.
|
||||
|
||||
For instance, you can use the streaming response in a simple HTTP Server:
|
||||
|
||||
```ts
|
||||
import { createServer } from "http";
|
||||
import { OpenAIAgent } from "llamaindex";
|
||||
import { OpenAIStream, streamToResponse } from "ai";
|
||||
import { tools } from "./tools";
|
||||
|
||||
const agent = new OpenAIAgent({
|
||||
tools: [...tools],
|
||||
});
|
||||
|
||||
const server = createServer(async (req, res) => {
|
||||
const response = await agent.chat({
|
||||
message: "What is weather today?",
|
||||
stream: true,
|
||||
});
|
||||
|
||||
// Transform the response into a string readable stream
|
||||
const stream: ReadableStream<string> = response.pipeThrough(
|
||||
new TransformStream({
|
||||
transform: (chunk, controller) => {
|
||||
controller.enqueue(chunk.response.delta);
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
// Pipe the stream to the response
|
||||
streamToResponse(stream, res);
|
||||
});
|
||||
|
||||
server.listen(3000);
|
||||
```
|
||||
|
||||
Or it can be integrated into React Server Components (RSC) in Next.js:
|
||||
|
||||
```tsx
|
||||
// app/actions/index.tsx
|
||||
"use server";
|
||||
import { createStreamableUI } from "ai/rsc";
|
||||
import { OpenAIAgent } from "llamaindex";
|
||||
import type { ChatMessage } from "llamaindex/llm/types";
|
||||
|
||||
export async function chatWithAgent(
|
||||
question: string,
|
||||
prevMessages: ChatMessage[] = [],
|
||||
) {
|
||||
const agent = new OpenAIAgent({
|
||||
tools: [],
|
||||
});
|
||||
const responseStream = await agent.chat({
|
||||
stream: true,
|
||||
message: question,
|
||||
chatHistory: prevMessages,
|
||||
});
|
||||
const uiStream = createStreamableUI(<div>loading...</div>);
|
||||
responseStream
|
||||
.pipeTo(
|
||||
new WritableStream({
|
||||
start: () => {
|
||||
uiStream.update("response:");
|
||||
},
|
||||
write: async (message) => {
|
||||
uiStream.append(message.response.delta);
|
||||
},
|
||||
}),
|
||||
)
|
||||
.catch(uiStream.error);
|
||||
return uiStream.value;
|
||||
}
|
||||
```
|
||||
|
||||
```tsx
|
||||
// app/src/page.tsx
|
||||
"use client";
|
||||
import { chatWithAgent } from "@/actions";
|
||||
import type { JSX } from "react";
|
||||
import { useFormState } from "react-dom";
|
||||
|
||||
export const runtime = "edge";
|
||||
|
||||
export default function Home() {
|
||||
const [state, action] = useFormState<JSX.Element | null>(async () => {
|
||||
return chatWithAgent("hello!", []);
|
||||
}, null);
|
||||
return (
|
||||
<main>
|
||||
{state}
|
||||
<form action={action}>
|
||||
<button>Chat</button>
|
||||
</form>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## Improvement in LlamaIndexTS v0.3.0
|
||||
|
||||
### Better TypeScript support
|
||||
|
||||
We have made significant improvements to the type system to ensure that all code is thoroughly checked before it is
|
||||
published. This ongoing enhancement has already resulted in better module reliability and developer experience.
|
||||
|
||||
For example, we have improved `FunctionTool` type with generic support:
|
||||
|
||||
```ts
|
||||
type Input = {
|
||||
a: number;
|
||||
b: number;
|
||||
};
|
||||
|
||||
const sumNumbers = FunctionTool.from<Input>(
|
||||
({ a, b }) => `${a + b}`, // a and b will be checked as number
|
||||
// JSON schema will be an error if you type wrong.
|
||||
{
|
||||
name: "sumNumbers",
|
||||
description: "Use this function to sum two numbers",
|
||||
parameters: {
|
||||
type: "object",
|
||||
properties: {
|
||||
a: {
|
||||
type: "number",
|
||||
description: "The first number",
|
||||
},
|
||||
b: {
|
||||
type: "number",
|
||||
description: "The second number",
|
||||
},
|
||||
},
|
||||
required: ["a", "b"],
|
||||
},
|
||||
},
|
||||
);
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Better Next.js, Deno, Cloudflare Worker, and Waku(Vite) support
|
||||
|
||||
In addition to Node.js, LlamaIndexTS now offers enhanced support for Next.js, Deno, and Cloudflare Workers, making it
|
||||
more versatile across different platforms.
|
||||
|
||||
For now, you can install llamaindex and directly import it into your existing Next.js, Deno or Cloudflare Worker project
|
||||
**without any extra configuration**.
|
||||
|
||||
#### [Deno](https://deno.com/)
|
||||
|
||||
You can use LlamaIndexTS in Deno by installation through JSR:
|
||||
|
||||
```sh
|
||||
jsr add @llamaindex/core
|
||||
```
|
||||
|
||||
#### [Cloudflare Worker](https://developers.cloudflare.com/workers/)
|
||||
|
||||
For Cloudflare Workers, here is a starter template:
|
||||
|
||||
```typescript
|
||||
export default {
|
||||
async fetch(
|
||||
request: Request,
|
||||
env: Env,
|
||||
ctx: ExecutionContext,
|
||||
): Promise<Response> {
|
||||
const { setEnvs } = await import("@llamaindex/env");
|
||||
setEnvs(env);
|
||||
const { OpenAIAgent } = await import("llamaindex");
|
||||
const agent = new OpenAIAgent({
|
||||
tools: [],
|
||||
});
|
||||
const responseStream = await agent.chat({
|
||||
stream: true,
|
||||
message: "Hello? What is the weather today?",
|
||||
});
|
||||
const textEncoder = new TextEncoder();
|
||||
const response = responseStream.pipeThrough(
|
||||
new TransformStream({
|
||||
transform: (chunk, controller) => {
|
||||
controller.enqueue(textEncoder.encode(chunk.response.delta));
|
||||
},
|
||||
}),
|
||||
);
|
||||
return new Response(response);
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
### [Waku (Vite)](https://waku.gg/)
|
||||
|
||||
Waku powered by Vite is a minimal React framework that supports multiple JS environments, including Deno, Cloudflare, and
|
||||
Node.js.
|
||||
|
||||
You can use LlamaIndexTS with Node.js output to enable full Node.js support with React.
|
||||
|
||||
```sh
|
||||
npm install llamaindex
|
||||
```
|
||||
|
||||
```ts
|
||||
// file: src/actions.ts
|
||||
"use server";
|
||||
import { Document, VectorStoreIndex } from "llamaindex";
|
||||
import { readFile } from "node:fs/promises";
|
||||
|
||||
const path = "node_modules/llamaindex/examples/abramov.txt";
|
||||
|
||||
const essay = await readFile(path, "utf-8");
|
||||
|
||||
// Create Document object with essay
|
||||
const document = new Document({ text: essay, id_: path });
|
||||
|
||||
// Split text and create embeddings. Store them in a VectorStoreIndex
|
||||
const index = await VectorStoreIndex.fromDocuments([document]);
|
||||
|
||||
const queryEngine = index.asQueryEngine();
|
||||
|
||||
export async function chatWithAI(question: string): Promise<string> {
|
||||
const { response } = await queryEngine.query({ query: question });
|
||||
return response;
|
||||
}
|
||||
```
|
||||
|
||||
```tsx
|
||||
// file: src/pages/index.tsx
|
||||
import { chatWithAI } from "./actions";
|
||||
|
||||
export default async function HomePage() {
|
||||
return (
|
||||
<div>
|
||||
<Chat askQuestion={chatWithAI} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
```tsx
|
||||
// file: src/components/Chat.tsx
|
||||
"use client";
|
||||
|
||||
export type ChatProps = {
|
||||
askQuestion: (question: string) => Promise<string>;
|
||||
};
|
||||
|
||||
export const Chat = (props: ChatProps) => {
|
||||
const [response, setResponse] = useState<string | null>(null);
|
||||
|
||||
return (
|
||||
<section className="border-blue-400 -mx-4 mt-4 rounded border border-dashed p-4">
|
||||
<h2 className="text-lg font-bold">Chat with AI</h2>
|
||||
{response ? (
|
||||
<p className="text-sm text-gray-600 max-w-sm">{response}</p>
|
||||
) : null}
|
||||
<form
|
||||
action={async (formData) => {
|
||||
const question = formData.get("question") as string | null;
|
||||
if (question) {
|
||||
setResponse(await props.askQuestion(question));
|
||||
}
|
||||
}}
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
name="question"
|
||||
className="border border-gray-400 rounded-sm px-2 py-0.5 text-sm"
|
||||
/>
|
||||
<button className="rounded-sm bg-black px-2 py-0.5 text-sm text-white">
|
||||
Ask
|
||||
</button>
|
||||
</form>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
```shell
|
||||
waku dev # development mode
|
||||
waku build # build for production
|
||||
waku start # start the production server
|
||||
```
|
||||
|
||||
Note that not all the modules are supported in all JS environments because of
|
||||
lack of the file system, network API,
|
||||
and incompatibility with the Node.js API by upstream dependencies.
|
||||
|
||||
But we are trying to make it more compatible with all the environments.
|
||||
|
||||
## What's the next?
|
||||
|
||||
As we continue to develop LlamaIndexTS, our focus remains on providing more comprehensive and powerful tools for
|
||||
creating custom agents.
|
||||
|
||||
### Align with the Python `llama-index`
|
||||
|
||||
We aim to align LlamaIndexTS with the Python version to ensure API consistency and ease of use for developers familiar
|
||||
with the Python ecosystem.
|
||||
|
||||
### Align with the Web Standard and JS development
|
||||
|
||||
Not all python APIs are compatible and easy to use in JavaScript/TypeScript.
|
||||
We are trying to make the API more compatible with the Web Standard and JavaScript modern development.
|
||||
|
||||
### More Agents
|
||||
|
||||
Future releases will introduce more agents from the Python Llama-Index and explore APIs tailored to real-world use
|
||||
cases.
|
||||
|
||||
### 🧪 `@llamaindex/tool`
|
||||
|
||||
We are exploring innovative ways to create tools for agents. The `@llamaindex/tool` library allows you to transform any
|
||||
function into a tool for an agent, simplifying the development process and reducing runtime costs.
|
||||
|
||||
```ts
|
||||
export function getWeather(city: string) {
|
||||
return `The weather in ${city} is sunny.`;
|
||||
}
|
||||
|
||||
// you don't need to worry about the shcema with different llm tools
|
||||
export function getTemperature(city: string) {
|
||||
return `The temperature in ${city} is 25°C.`;
|
||||
}
|
||||
|
||||
export function getCurrentCity() {
|
||||
return "New York";
|
||||
}
|
||||
```
|
||||
|
||||
These functions can be easily integrated into your applications, such as Next.js:
|
||||
|
||||
```ts
|
||||
"use server";
|
||||
import { OpenAI } from "openai";
|
||||
import { getTools } from "@llamaindex/tool";
|
||||
|
||||
export async function chat(message: string) {
|
||||
const openai = new OpenAI();
|
||||
openai.chat.completions.create({
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: "What is the weather in the current city?",
|
||||
},
|
||||
],
|
||||
tools: getTools("openai"),
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
```ts
|
||||
// next.config.js
|
||||
const withTool = require("@llamaindex/tool/next");
|
||||
|
||||
const config = {
|
||||
// Your original Next.js config
|
||||
};
|
||||
module.exports = withTool(config);
|
||||
```
|
||||
|
||||
The functions are automatically transformed into tools for the agent at compile time, which eliminates any extra runtime
|
||||
costs. This feature is particularly beneficial when you need to debug or deploy your assistant.
|
||||
|
||||
For deploying your local functions into OpenAI, you can use a simple command:
|
||||
|
||||
```sh
|
||||
npm install -g @llamaindex/tool
|
||||
mkai --tools ./src/index.llama.ts
|
||||
# Successfully created assistant: asst_XXX
|
||||
# chat with your assistant by `chatai --assistant asst_XXX`
|
||||
chatai --assistant asst_XXX
|
||||
# Open your browser and chat with your assistant
|
||||
# Running at http://localhost:3000
|
||||
```
|
||||
|
||||
This deployment process simplifies the testing and implementation of your custom tools in a live environment.
|
||||
|
||||
As this project is still in its early stages, we continue to explore the best ways to create and integrate tools for
|
||||
agents. For more information and updates, visit the @llamaindex/tool repository.
|
||||
|
||||
This release of LlamaIndexTS v0.3.0 marks a significant step forward in our journey to provide developers with robust,
|
||||
flexible tools for building advanced agents. We are excited to see how our community utilizes these new capabilities to
|
||||
create innovative solutions and look forward to continuing to support and enhance LlamaIndexTS in future updates.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 178 KiB |
@@ -0,0 +1 @@
|
||||
api/
|
||||
@@ -1,2 +0,0 @@
|
||||
label: "API"
|
||||
position: 6
|
||||
@@ -1,193 +0,0 @@
|
||||
---
|
||||
id: "Anthropic"
|
||||
title: "Class: Anthropic"
|
||||
sidebar_label: "Anthropic"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Anthropic LLM implementation
|
||||
|
||||
## Implements
|
||||
|
||||
- [`LLM`](../interfaces/LLM.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new Anthropic**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Partial`<[`Anthropic`](Anthropic.md)\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:449](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L449)
|
||||
|
||||
## Properties
|
||||
|
||||
### apiKey
|
||||
|
||||
• `Optional` **apiKey**: `string` = `undefined`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:442](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L442)
|
||||
|
||||
___
|
||||
|
||||
### callbackManager
|
||||
|
||||
• `Optional` **callbackManager**: [`CallbackManager`](CallbackManager.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:447](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L447)
|
||||
|
||||
___
|
||||
|
||||
### maxRetries
|
||||
|
||||
• **maxRetries**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:443](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L443)
|
||||
|
||||
___
|
||||
|
||||
### maxTokens
|
||||
|
||||
• `Optional` **maxTokens**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:439](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L439)
|
||||
|
||||
___
|
||||
|
||||
### model
|
||||
|
||||
• **model**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:436](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L436)
|
||||
|
||||
___
|
||||
|
||||
### session
|
||||
|
||||
• **session**: `AnthropicSession`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:445](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L445)
|
||||
|
||||
___
|
||||
|
||||
### temperature
|
||||
|
||||
• **temperature**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:437](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L437)
|
||||
|
||||
___
|
||||
|
||||
### timeout
|
||||
|
||||
• `Optional` **timeout**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:444](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L444)
|
||||
|
||||
___
|
||||
|
||||
### topP
|
||||
|
||||
• **topP**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:438](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L438)
|
||||
|
||||
## Methods
|
||||
|
||||
### chat
|
||||
|
||||
▸ **chat**(`messages`, `parentEvent?`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
Get a chat response from the LLM
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[LLM](../interfaces/LLM.md).[chat](../interfaces/LLM.md#chat)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:484](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L484)
|
||||
|
||||
___
|
||||
|
||||
### complete
|
||||
|
||||
▸ **complete**(`prompt`, `parentEvent?`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
Get a prompt completion from the LLM
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `prompt` | `string` | the prompt to complete |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) | - |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[LLM](../interfaces/LLM.md).[complete](../interfaces/LLM.md#complete)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:502](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L502)
|
||||
|
||||
___
|
||||
|
||||
### mapMessagesToPrompt
|
||||
|
||||
▸ **mapMessagesToPrompt**(`messages`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:469](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L469)
|
||||
@@ -1,81 +0,0 @@
|
||||
---
|
||||
id: "BaseEmbedding"
|
||||
title: "Class: BaseEmbedding"
|
||||
sidebar_label: "BaseEmbedding"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`BaseEmbedding`**
|
||||
|
||||
↳ [`OpenAIEmbedding`](OpenAIEmbedding.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new BaseEmbedding**()
|
||||
|
||||
## Methods
|
||||
|
||||
### getQueryEmbedding
|
||||
|
||||
▸ `Abstract` **getQueryEmbedding**(`query`): `Promise`<`number`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`number`[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:213](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L213)
|
||||
|
||||
___
|
||||
|
||||
### getTextEmbedding
|
||||
|
||||
▸ `Abstract` **getTextEmbedding**(`text`): `Promise`<`number`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `text` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`number`[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:212](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L212)
|
||||
|
||||
___
|
||||
|
||||
### similarity
|
||||
|
||||
▸ **similarity**(`embedding1`, `embedding2`, `mode?`): `number`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `embedding1` | `number`[] | `undefined` |
|
||||
| `embedding2` | `number`[] | `undefined` |
|
||||
| `mode` | [`SimilarityType`](../enums/SimilarityType.md) | `SimilarityType.DEFAULT` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:204](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L204)
|
||||
@@ -1,216 +0,0 @@
|
||||
---
|
||||
id: "BaseIndex"
|
||||
title: "Class: BaseIndex<T>"
|
||||
sidebar_label: "BaseIndex"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Indexes are the data structure that we store our nodes and embeddings in so
|
||||
they can be retrieved for our queries.
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`BaseIndex`**
|
||||
|
||||
↳ [`ListIndex`](ListIndex.md)
|
||||
|
||||
↳ [`VectorStoreIndex`](VectorStoreIndex.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new BaseIndex**<`T`\>(`init`)
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init` | [`BaseIndexInit`](../interfaces/BaseIndexInit.md)<`T`\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:130](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L130)
|
||||
|
||||
## Properties
|
||||
|
||||
### docStore
|
||||
|
||||
• **docStore**: `BaseDocumentStore`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:125](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L125)
|
||||
|
||||
___
|
||||
|
||||
### indexStore
|
||||
|
||||
• `Optional` **indexStore**: `BaseIndexStore`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:127](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L127)
|
||||
|
||||
___
|
||||
|
||||
### indexStruct
|
||||
|
||||
• **indexStruct**: `T`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:128](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L128)
|
||||
|
||||
___
|
||||
|
||||
### serviceContext
|
||||
|
||||
• **serviceContext**: [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:123](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L123)
|
||||
|
||||
___
|
||||
|
||||
### storageContext
|
||||
|
||||
• **storageContext**: [`StorageContext`](../interfaces/StorageContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L124)
|
||||
|
||||
___
|
||||
|
||||
### vectorStore
|
||||
|
||||
• `Optional` **vectorStore**: [`VectorStore`](../interfaces/VectorStore.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:126](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L126)
|
||||
|
||||
## Methods
|
||||
|
||||
### asQueryEngine
|
||||
|
||||
▸ `Abstract` **asQueryEngine**(`options?`): [`BaseQueryEngine`](../interfaces/BaseQueryEngine.md)
|
||||
|
||||
Create a new query engine from the index. It will also create a retriever
|
||||
and response synthezier if they are not provided.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `options?` | `Object` | you can supply your own custom Retriever and ResponseSynthesizer |
|
||||
| `options.responseSynthesizer?` | [`ResponseSynthesizer`](ResponseSynthesizer.md) | - |
|
||||
| `options.retriever?` | [`BaseRetriever`](../interfaces/BaseRetriever.md) | - |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`BaseQueryEngine`](../interfaces/BaseQueryEngine.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:150](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L150)
|
||||
|
||||
___
|
||||
|
||||
### asRetriever
|
||||
|
||||
▸ `Abstract` **asRetriever**(`options?`): [`BaseRetriever`](../interfaces/BaseRetriever.md)
|
||||
|
||||
Create a new retriever from the index.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `options?` | `any` |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`BaseRetriever`](../interfaces/BaseRetriever.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:143](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L143)
|
||||
|
||||
___
|
||||
|
||||
### deleteRefDoc
|
||||
|
||||
▸ `Abstract` **deleteRefDoc**(`refDocId`, `deleteFromDocStore?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `refDocId` | `string` |
|
||||
| `deleteFromDocStore?` | `boolean` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:168](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L168)
|
||||
|
||||
___
|
||||
|
||||
### insert
|
||||
|
||||
▸ **insert**(`document`): `Promise`<`void`\>
|
||||
|
||||
Insert a document into the index.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `document` | [`Document`](Document.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:159](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L159)
|
||||
|
||||
___
|
||||
|
||||
### insertNodes
|
||||
|
||||
▸ `Abstract` **insertNodes**(`nodes`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `nodes` | [`BaseNode`](BaseNode.md)[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:167](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L167)
|
||||
@@ -1,308 +0,0 @@
|
||||
---
|
||||
id: "BaseNode"
|
||||
title: "Class: BaseNode"
|
||||
sidebar_label: "BaseNode"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Generic abstract class for retrievable nodes
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`BaseNode`**
|
||||
|
||||
↳ [`TextNode`](TextNode.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new BaseNode**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Partial`<[`BaseNode`](BaseNode.md)\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:55](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L55)
|
||||
|
||||
## Properties
|
||||
|
||||
### embedding
|
||||
|
||||
• `Optional` **embedding**: `number`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
### excludedEmbedMetadataKeys
|
||||
|
||||
• **excludedEmbedMetadataKeys**: `string`[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:50](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L50)
|
||||
|
||||
___
|
||||
|
||||
### excludedLlmMetadataKeys
|
||||
|
||||
• **excludedLlmMetadataKeys**: `string`[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:51](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### hash
|
||||
|
||||
• **hash**: `string` = `""`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:53](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### id\_
|
||||
|
||||
• **id\_**: `string`
|
||||
|
||||
The unique ID of the Node/Document. The trailing underscore is here
|
||||
to avoid collisions with the id keyword in Python.
|
||||
|
||||
Set to a UUID by default.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### metadata
|
||||
|
||||
• **metadata**: `Record`<`string`, `any`\> = `{}`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
### relationships
|
||||
|
||||
• **relationships**: `Partial`<`Record`<[`NodeRelationship`](../enums/NodeRelationship.md), [`RelatedNodeType`](../modules.md#relatednodetype)\>\> = `{}`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L52)
|
||||
|
||||
## Accessors
|
||||
|
||||
### childNodes
|
||||
|
||||
• `get` **childNodes**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:107](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L107)
|
||||
|
||||
___
|
||||
|
||||
### nextNode
|
||||
|
||||
• `get` **nextNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:87](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L87)
|
||||
|
||||
___
|
||||
|
||||
### parentNode
|
||||
|
||||
• `get` **parentNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L97)
|
||||
|
||||
___
|
||||
|
||||
### prevNode
|
||||
|
||||
• `get` **prevNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L75)
|
||||
|
||||
___
|
||||
|
||||
### sourceNode
|
||||
|
||||
• `get` **sourceNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L65)
|
||||
|
||||
## Methods
|
||||
|
||||
### asRelatedNodeInfo
|
||||
|
||||
▸ **asRelatedNodeInfo**(): [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:129](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L129)
|
||||
|
||||
___
|
||||
|
||||
### generateHash
|
||||
|
||||
▸ `Abstract` **generateHash**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:119](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L119)
|
||||
|
||||
___
|
||||
|
||||
### getContent
|
||||
|
||||
▸ `Abstract` **getContent**(`metadataMode`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `metadataMode` | [`MetadataMode`](../enums/MetadataMode.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:61](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L61)
|
||||
|
||||
___
|
||||
|
||||
### getEmbedding
|
||||
|
||||
▸ **getEmbedding**(): `number`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:121](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L121)
|
||||
|
||||
___
|
||||
|
||||
### getMetadataStr
|
||||
|
||||
▸ `Abstract` **getMetadataStr**(`metadataMode`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `metadataMode` | [`MetadataMode`](../enums/MetadataMode.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L62)
|
||||
|
||||
___
|
||||
|
||||
### getType
|
||||
|
||||
▸ `Abstract` **getType**(): [`ObjectType`](../enums/ObjectType.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ObjectType`](../enums/ObjectType.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:59](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
### setContent
|
||||
|
||||
▸ `Abstract` **setContent**(`value`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `value` | `any` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:63](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L63)
|
||||
|
||||
___
|
||||
|
||||
### toJSON
|
||||
|
||||
▸ **toJSON**(): `Record`<`string`, `any`\>
|
||||
|
||||
Used with built in JSON.stringify
|
||||
|
||||
#### Returns
|
||||
|
||||
`Record`<`string`, `any`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:141](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L141)
|
||||
@@ -1,83 +0,0 @@
|
||||
---
|
||||
id: "CallbackManager"
|
||||
title: "Class: CallbackManager"
|
||||
sidebar_label: "CallbackManager"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implements
|
||||
|
||||
- `CallbackManagerMethods`
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new CallbackManager**(`handlers?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `handlers?` | `CallbackManagerMethods` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[callbacks/CallbackManager.ts:67](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L67)
|
||||
|
||||
## Properties
|
||||
|
||||
### onLLMStream
|
||||
|
||||
• `Optional` **onLLMStream**: (`params`: [`StreamCallbackResponse`](../interfaces/StreamCallbackResponse.md)) => `void` \| `Promise`<`void`\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`params`): `void` \| `Promise`<`void`\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `params` | [`StreamCallbackResponse`](../interfaces/StreamCallbackResponse.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`void` \| `Promise`<`void`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
CallbackManagerMethods.onLLMStream
|
||||
|
||||
#### Defined in
|
||||
|
||||
[callbacks/CallbackManager.ts:64](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L64)
|
||||
|
||||
___
|
||||
|
||||
### onRetrieve
|
||||
|
||||
• `Optional` **onRetrieve**: (`params`: [`RetrievalCallbackResponse`](../interfaces/RetrievalCallbackResponse.md)) => `void` \| `Promise`<`void`\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`params`): `void` \| `Promise`<`void`\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `params` | [`RetrievalCallbackResponse`](../interfaces/RetrievalCallbackResponse.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`void` \| `Promise`<`void`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
CallbackManagerMethods.onRetrieve
|
||||
|
||||
#### Defined in
|
||||
|
||||
[callbacks/CallbackManager.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L65)
|
||||
@@ -1,106 +0,0 @@
|
||||
---
|
||||
id: "CompactAndRefine"
|
||||
title: "Class: CompactAndRefine"
|
||||
sidebar_label: "CompactAndRefine"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
CompactAndRefine is a slight variation of Refine that first compacts the text chunks into the smallest possible number of chunks.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Refine`](Refine.md)
|
||||
|
||||
↳ **`CompactAndRefine`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new CompactAndRefine**(`serviceContext`, `textQATemplate?`, `refineTemplate?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `serviceContext` | [`ServiceContext`](../interfaces/ServiceContext.md) |
|
||||
| `textQATemplate?` | [`SimplePrompt`](../modules.md#simpleprompt) |
|
||||
| `refineTemplate?` | [`SimplePrompt`](../modules.md#simpleprompt) |
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Refine](Refine.md).[constructor](Refine.md#constructor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:78](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L78)
|
||||
|
||||
## Properties
|
||||
|
||||
### refineTemplate
|
||||
|
||||
• **refineTemplate**: [`SimplePrompt`](../modules.md#simpleprompt)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Refine](Refine.md).[refineTemplate](Refine.md#refinetemplate)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L76)
|
||||
|
||||
___
|
||||
|
||||
### serviceContext
|
||||
|
||||
• **serviceContext**: [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Refine](Refine.md).[serviceContext](Refine.md#servicecontext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L74)
|
||||
|
||||
___
|
||||
|
||||
### textQATemplate
|
||||
|
||||
• **textQATemplate**: [`SimplePrompt`](../modules.md#simpleprompt)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Refine](Refine.md).[textQATemplate](Refine.md#textqatemplate)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L75)
|
||||
|
||||
## Methods
|
||||
|
||||
### getResponse
|
||||
|
||||
▸ **getResponse**(`query`, `textChunks`, `parentEvent?`, `prevResponse?`): `Promise`<`string`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `textChunks` | `string`[] |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
| `prevResponse?` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Refine](Refine.md).[getResponse](Refine.md#getresponse)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:181](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L181)
|
||||
@@ -1,148 +0,0 @@
|
||||
---
|
||||
id: "CondenseQuestionChatEngine"
|
||||
title: "Class: CondenseQuestionChatEngine"
|
||||
sidebar_label: "CondenseQuestionChatEngine"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
CondenseQuestionChatEngine is used in conjunction with a Index (for example VectorStoreIndex).
|
||||
It does two steps on taking a user's chat message: first, it condenses the chat message
|
||||
with the previous chat history into a question with more context.
|
||||
Then, it queries the underlying Index using the new question with context and returns
|
||||
the response.
|
||||
CondenseQuestionChatEngine performs well when the input is primarily questions about the
|
||||
underlying data. It performs less well when the chat messages are not questions about the
|
||||
data, or are very referential to previous context.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`ChatEngine`](../interfaces/ChatEngine.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new CondenseQuestionChatEngine**(`init`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init` | `Object` |
|
||||
| `init.chatHistory` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
|
||||
| `init.condenseMessagePrompt?` | [`SimplePrompt`](../modules.md#simpleprompt) |
|
||||
| `init.queryEngine` | [`BaseQueryEngine`](../interfaces/BaseQueryEngine.md) |
|
||||
| `init.serviceContext?` | [`ServiceContext`](../interfaces/ServiceContext.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L75)
|
||||
|
||||
## Properties
|
||||
|
||||
### chatHistory
|
||||
|
||||
• **chatHistory**: [`ChatMessage`](../interfaces/ChatMessage.md)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:71](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L71)
|
||||
|
||||
___
|
||||
|
||||
### condenseMessagePrompt
|
||||
|
||||
• **condenseMessagePrompt**: [`SimplePrompt`](../modules.md#simpleprompt)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:73](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L73)
|
||||
|
||||
___
|
||||
|
||||
### queryEngine
|
||||
|
||||
• **queryEngine**: [`BaseQueryEngine`](../interfaces/BaseQueryEngine.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:70](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L70)
|
||||
|
||||
___
|
||||
|
||||
### serviceContext
|
||||
|
||||
• **serviceContext**: [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:72](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L72)
|
||||
|
||||
## Methods
|
||||
|
||||
### chat
|
||||
|
||||
▸ **chat**(`message`, `chatHistory?`): `Promise`<[`Response`](Response.md)\>
|
||||
|
||||
Send message along with the class's current chat history to the LLM.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `message` | `string` | |
|
||||
| `chatHistory?` | [`ChatMessage`](../interfaces/ChatMessage.md)[] | optional chat history if you want to customize the chat history |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Response`](Response.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ChatEngine](../interfaces/ChatEngine.md).[chat](../interfaces/ChatEngine.md#chat)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:100](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L100)
|
||||
|
||||
___
|
||||
|
||||
### condenseQuestion
|
||||
|
||||
▸ `Private` **condenseQuestion**(`chatHistory`, `question`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `chatHistory` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
|
||||
| `question` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L89)
|
||||
|
||||
___
|
||||
|
||||
### reset
|
||||
|
||||
▸ **reset**(): `void`
|
||||
|
||||
Resets the chat history so that it's empty.
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ChatEngine](../interfaces/ChatEngine.md).[reset](../interfaces/ChatEngine.md#reset)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:118](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L118)
|
||||
@@ -1,111 +0,0 @@
|
||||
---
|
||||
id: "ContextChatEngine"
|
||||
title: "Class: ContextChatEngine"
|
||||
sidebar_label: "ContextChatEngine"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
ContextChatEngine uses the Index to get the appropriate context for each query.
|
||||
The context is stored in the system prompt, and the chat history is preserved,
|
||||
ideally allowing the appropriate context to be surfaced for each query.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`ChatEngine`](../interfaces/ChatEngine.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new ContextChatEngine**(`init`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init` | `Object` |
|
||||
| `init.chatHistory?` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
|
||||
| `init.chatModel?` | [`OpenAI`](OpenAI.md) |
|
||||
| `init.retriever` | [`BaseRetriever`](../interfaces/BaseRetriever.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:133](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L133)
|
||||
|
||||
## Properties
|
||||
|
||||
### chatHistory
|
||||
|
||||
• **chatHistory**: [`ChatMessage`](../interfaces/ChatMessage.md)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:131](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L131)
|
||||
|
||||
___
|
||||
|
||||
### chatModel
|
||||
|
||||
• **chatModel**: [`OpenAI`](OpenAI.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:130](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L130)
|
||||
|
||||
___
|
||||
|
||||
### retriever
|
||||
|
||||
• **retriever**: [`BaseRetriever`](../interfaces/BaseRetriever.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:129](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L129)
|
||||
|
||||
## Methods
|
||||
|
||||
### chat
|
||||
|
||||
▸ **chat**(`message`, `chatHistory?`): `Promise`<[`Response`](Response.md)\>
|
||||
|
||||
Send message along with the class's current chat history to the LLM.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `message` | `string` | |
|
||||
| `chatHistory?` | [`ChatMessage`](../interfaces/ChatMessage.md)[] | optional chat history if you want to customize the chat history |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Response`](Response.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ChatEngine](../interfaces/ChatEngine.md).[chat](../interfaces/ChatEngine.md#chat)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:144](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L144)
|
||||
|
||||
___
|
||||
|
||||
### reset
|
||||
|
||||
▸ **reset**(): `void`
|
||||
|
||||
Resets the chat history so that it's empty.
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ChatEngine](../interfaces/ChatEngine.md).[reset](../interfaces/ChatEngine.md#reset)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:182](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L182)
|
||||
@@ -1,492 +0,0 @@
|
||||
---
|
||||
id: "Document"
|
||||
title: "Class: Document"
|
||||
sidebar_label: "Document"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A document is just a special text node with a docId.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`TextNode`](TextNode.md)
|
||||
|
||||
↳ **`Document`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new Document**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Partial`<[`Document`](Document.md)\> |
|
||||
|
||||
#### Overrides
|
||||
|
||||
[TextNode](TextNode.md).[constructor](TextNode.md#constructor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:257](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L257)
|
||||
|
||||
## Properties
|
||||
|
||||
### embedding
|
||||
|
||||
• `Optional` **embedding**: `number`[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[embedding](TextNode.md#embedding)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
### endCharIdx
|
||||
|
||||
• `Optional` **endCharIdx**: `number`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[endCharIdx](TextNode.md#endcharidx)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:152](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L152)
|
||||
|
||||
___
|
||||
|
||||
### excludedEmbedMetadataKeys
|
||||
|
||||
• **excludedEmbedMetadataKeys**: `string`[] = `[]`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[excludedEmbedMetadataKeys](TextNode.md#excludedembedmetadatakeys)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:50](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L50)
|
||||
|
||||
___
|
||||
|
||||
### excludedLlmMetadataKeys
|
||||
|
||||
• **excludedLlmMetadataKeys**: `string`[] = `[]`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[excludedLlmMetadataKeys](TextNode.md#excludedllmmetadatakeys)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:51](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### hash
|
||||
|
||||
• **hash**: `string` = `""`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[hash](TextNode.md#hash)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:53](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### id\_
|
||||
|
||||
• **id\_**: `string`
|
||||
|
||||
The unique ID of the Node/Document. The trailing underscore is here
|
||||
to avoid collisions with the id keyword in Python.
|
||||
|
||||
Set to a UUID by default.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[id_](TextNode.md#id_)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### metadata
|
||||
|
||||
• **metadata**: `Record`<`string`, `any`\> = `{}`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[metadata](TextNode.md#metadata)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
### metadataSeparator
|
||||
|
||||
• **metadataSeparator**: `string` = `"\n"`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[metadataSeparator](TextNode.md#metadataseparator)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:155](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L155)
|
||||
|
||||
___
|
||||
|
||||
### relationships
|
||||
|
||||
• **relationships**: `Partial`<`Record`<[`NodeRelationship`](../enums/NodeRelationship.md), [`RelatedNodeType`](../modules.md#relatednodetype)\>\> = `{}`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[relationships](TextNode.md#relationships)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L52)
|
||||
|
||||
___
|
||||
|
||||
### startCharIdx
|
||||
|
||||
• `Optional` **startCharIdx**: `number`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[startCharIdx](TextNode.md#startcharidx)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:151](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L151)
|
||||
|
||||
___
|
||||
|
||||
### text
|
||||
|
||||
• **text**: `string` = `""`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[text](TextNode.md#text)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:150](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L150)
|
||||
|
||||
## Accessors
|
||||
|
||||
### childNodes
|
||||
|
||||
• `get` **childNodes**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TextNode.childNodes
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:107](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L107)
|
||||
|
||||
___
|
||||
|
||||
### nextNode
|
||||
|
||||
• `get` **nextNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TextNode.nextNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:87](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L87)
|
||||
|
||||
___
|
||||
|
||||
### parentNode
|
||||
|
||||
• `get` **parentNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TextNode.parentNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L97)
|
||||
|
||||
___
|
||||
|
||||
### prevNode
|
||||
|
||||
• `get` **prevNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TextNode.prevNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L75)
|
||||
|
||||
___
|
||||
|
||||
### sourceNode
|
||||
|
||||
• `get` **sourceNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TextNode.sourceNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L65)
|
||||
|
||||
## Methods
|
||||
|
||||
### asRelatedNodeInfo
|
||||
|
||||
▸ **asRelatedNodeInfo**(): [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[asRelatedNodeInfo](TextNode.md#asrelatednodeinfo)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:129](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L129)
|
||||
|
||||
___
|
||||
|
||||
### generateHash
|
||||
|
||||
▸ **generateHash**(): `string`
|
||||
|
||||
Generate a hash of the text node.
|
||||
The ID is not part of the hash as it can change independent of content.
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[generateHash](TextNode.md#generatehash)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:173](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L173)
|
||||
|
||||
___
|
||||
|
||||
### getContent
|
||||
|
||||
▸ **getContent**(`metadataMode?`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `metadataMode` | [`MetadataMode`](../enums/MetadataMode.md) | `MetadataMode.NONE` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[getContent](TextNode.md#getcontent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:187](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L187)
|
||||
|
||||
___
|
||||
|
||||
### getEmbedding
|
||||
|
||||
▸ **getEmbedding**(): `number`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[getEmbedding](TextNode.md#getembedding)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:121](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L121)
|
||||
|
||||
___
|
||||
|
||||
### getMetadataStr
|
||||
|
||||
▸ **getMetadataStr**(`metadataMode`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `metadataMode` | [`MetadataMode`](../enums/MetadataMode.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[getMetadataStr](TextNode.md#getmetadatastr)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:192](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L192)
|
||||
|
||||
___
|
||||
|
||||
### getNodeInfo
|
||||
|
||||
▸ **getNodeInfo**(): `Object`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Object`
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `end` | `undefined` \| `number` |
|
||||
| `start` | `undefined` \| `number` |
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[getNodeInfo](TextNode.md#getnodeinfo)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:219](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L219)
|
||||
|
||||
___
|
||||
|
||||
### getText
|
||||
|
||||
▸ **getText**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[getText](TextNode.md#gettext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:223](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L223)
|
||||
|
||||
___
|
||||
|
||||
### getType
|
||||
|
||||
▸ **getType**(): [`ObjectType`](../enums/ObjectType.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ObjectType`](../enums/ObjectType.md)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[TextNode](TextNode.md).[getType](TextNode.md#gettype)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:266](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L266)
|
||||
|
||||
___
|
||||
|
||||
### setContent
|
||||
|
||||
▸ **setContent**(`value`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `value` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[setContent](TextNode.md#setcontent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:213](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L213)
|
||||
|
||||
___
|
||||
|
||||
### toJSON
|
||||
|
||||
▸ **toJSON**(): `Record`<`string`, `any`\>
|
||||
|
||||
Used with built in JSON.stringify
|
||||
|
||||
#### Returns
|
||||
|
||||
`Record`<`string`, `any`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[toJSON](TextNode.md#tojson)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:141](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L141)
|
||||
@@ -1,129 +0,0 @@
|
||||
---
|
||||
id: "InMemoryFileSystem"
|
||||
title: "Class: InMemoryFileSystem"
|
||||
sidebar_label: "InMemoryFileSystem"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A filesystem implementation that stores files in memory.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`GenericFileSystem`](../interfaces/GenericFileSystem.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new InMemoryFileSystem**()
|
||||
|
||||
## Properties
|
||||
|
||||
### files
|
||||
|
||||
• `Private` **files**: `Record`<`string`, `any`\> = `{}`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/FileSystem.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L25)
|
||||
|
||||
## Methods
|
||||
|
||||
### access
|
||||
|
||||
▸ **access**(`path`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `path` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[GenericFileSystem](../interfaces/GenericFileSystem.md).[access](../interfaces/GenericFileSystem.md#access)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/FileSystem.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### mkdir
|
||||
|
||||
▸ **mkdir**(`path`, `options?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `path` | `string` |
|
||||
| `options?` | `any` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[GenericFileSystem](../interfaces/GenericFileSystem.md).[mkdir](../interfaces/GenericFileSystem.md#mkdir)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/FileSystem.ts:44](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L44)
|
||||
|
||||
___
|
||||
|
||||
### readFile
|
||||
|
||||
▸ **readFile**(`path`, `options?`): `Promise`<`string`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `path` | `string` |
|
||||
| `options?` | `any` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[GenericFileSystem](../interfaces/GenericFileSystem.md).[readFile](../interfaces/GenericFileSystem.md#readfile)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/FileSystem.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### writeFile
|
||||
|
||||
▸ **writeFile**(`path`, `content`, `options?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `path` | `string` |
|
||||
| `content` | `string` |
|
||||
| `options?` | `any` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[GenericFileSystem](../interfaces/GenericFileSystem.md).[writeFile](../interfaces/GenericFileSystem.md#writefile)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/FileSystem.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/FileSystem.ts#L27)
|
||||
@@ -1,161 +0,0 @@
|
||||
---
|
||||
id: "IndexDict"
|
||||
title: "Class: IndexDict"
|
||||
sidebar_label: "IndexDict"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
The underlying structure of each index.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`IndexStruct`](IndexStruct.md)
|
||||
|
||||
↳ **`IndexDict`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new IndexDict**(`indexId?`, `summary?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `indexId` | `string` | `undefined` |
|
||||
| `summary` | `undefined` | `undefined` |
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[IndexStruct](IndexStruct.md).[constructor](IndexStruct.md#constructor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L19)
|
||||
|
||||
## Properties
|
||||
|
||||
### indexId
|
||||
|
||||
• **indexId**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[IndexStruct](IndexStruct.md).[indexId](IndexStruct.md#indexid)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### nodesDict
|
||||
|
||||
• **nodesDict**: `Record`<`string`, [`BaseNode`](BaseNode.md)\> = `{}`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### summary
|
||||
|
||||
• `Optional` **summary**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[IndexStruct](IndexStruct.md).[summary](IndexStruct.md#summary)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`IndexStructType`](../enums/IndexStructType.md) = `IndexStructType.SIMPLE_DICT`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L46)
|
||||
|
||||
## Methods
|
||||
|
||||
### addNode
|
||||
|
||||
▸ **addNode**(`node`, `textId?`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `node` | [`BaseNode`](BaseNode.md) |
|
||||
| `textId?` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:55](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L55)
|
||||
|
||||
___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`nodeId`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `nodeId` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:68](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L68)
|
||||
|
||||
___
|
||||
|
||||
### getSummary
|
||||
|
||||
▸ **getSummary**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[IndexStruct](IndexStruct.md).[getSummary](IndexStruct.md#getsummary)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L48)
|
||||
|
||||
___
|
||||
|
||||
### toJson
|
||||
|
||||
▸ **toJson**(): `Record`<`string`, `unknown`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Record`<`string`, `unknown`\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
[IndexStruct](IndexStruct.md).[toJson](IndexStruct.md#tojson)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:60](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L60)
|
||||
@@ -1,140 +0,0 @@
|
||||
---
|
||||
id: "IndexList"
|
||||
title: "Class: IndexList"
|
||||
sidebar_label: "IndexList"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
The underlying structure of each index.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`IndexStruct`](IndexStruct.md)
|
||||
|
||||
↳ **`IndexList`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new IndexList**(`indexId?`, `summary?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `indexId` | `string` | `undefined` |
|
||||
| `summary` | `undefined` | `undefined` |
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[IndexStruct](IndexStruct.md).[constructor](IndexStruct.md#constructor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L19)
|
||||
|
||||
## Properties
|
||||
|
||||
### indexId
|
||||
|
||||
• **indexId**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[IndexStruct](IndexStruct.md).[indexId](IndexStruct.md#indexid)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### nodes
|
||||
|
||||
• **nodes**: `string`[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:93](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L93)
|
||||
|
||||
___
|
||||
|
||||
### summary
|
||||
|
||||
• `Optional` **summary**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[IndexStruct](IndexStruct.md).[summary](IndexStruct.md#summary)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`IndexStructType`](../enums/IndexStructType.md) = `IndexStructType.LIST`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L94)
|
||||
|
||||
## Methods
|
||||
|
||||
### addNode
|
||||
|
||||
▸ **addNode**(`node`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `node` | [`BaseNode`](BaseNode.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:96](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L96)
|
||||
|
||||
___
|
||||
|
||||
### getSummary
|
||||
|
||||
▸ **getSummary**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[IndexStruct](IndexStruct.md).[getSummary](IndexStruct.md#getsummary)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### toJson
|
||||
|
||||
▸ **toJson**(): `Record`<`string`, `unknown`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Record`<`string`, `unknown`\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
[IndexStruct](IndexStruct.md).[toJson](IndexStruct.md#tojson)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:100](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L100)
|
||||
@@ -1,502 +0,0 @@
|
||||
---
|
||||
id: "IndexNode"
|
||||
title: "Class: IndexNode"
|
||||
sidebar_label: "IndexNode"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
TextNode is the default node type for text. Most common node type in LlamaIndex.TS
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`TextNode`](TextNode.md)
|
||||
|
||||
↳ **`IndexNode`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new IndexNode**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Partial`<[`IndexNode`](IndexNode.md)\> |
|
||||
|
||||
#### Overrides
|
||||
|
||||
[TextNode](TextNode.md).[constructor](TextNode.md#constructor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:239](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L239)
|
||||
|
||||
## Properties
|
||||
|
||||
### embedding
|
||||
|
||||
• `Optional` **embedding**: `number`[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[embedding](TextNode.md#embedding)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
### endCharIdx
|
||||
|
||||
• `Optional` **endCharIdx**: `number`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[endCharIdx](TextNode.md#endcharidx)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:152](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L152)
|
||||
|
||||
___
|
||||
|
||||
### excludedEmbedMetadataKeys
|
||||
|
||||
• **excludedEmbedMetadataKeys**: `string`[] = `[]`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[excludedEmbedMetadataKeys](TextNode.md#excludedembedmetadatakeys)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:50](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L50)
|
||||
|
||||
___
|
||||
|
||||
### excludedLlmMetadataKeys
|
||||
|
||||
• **excludedLlmMetadataKeys**: `string`[] = `[]`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[excludedLlmMetadataKeys](TextNode.md#excludedllmmetadatakeys)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:51](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### hash
|
||||
|
||||
• **hash**: `string` = `""`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[hash](TextNode.md#hash)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:53](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### id\_
|
||||
|
||||
• **id\_**: `string`
|
||||
|
||||
The unique ID of the Node/Document. The trailing underscore is here
|
||||
to avoid collisions with the id keyword in Python.
|
||||
|
||||
Set to a UUID by default.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[id_](TextNode.md#id_)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### indexId
|
||||
|
||||
• **indexId**: `string` = `""`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:237](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L237)
|
||||
|
||||
___
|
||||
|
||||
### metadata
|
||||
|
||||
• **metadata**: `Record`<`string`, `any`\> = `{}`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[metadata](TextNode.md#metadata)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
### metadataSeparator
|
||||
|
||||
• **metadataSeparator**: `string` = `"\n"`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[metadataSeparator](TextNode.md#metadataseparator)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:155](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L155)
|
||||
|
||||
___
|
||||
|
||||
### relationships
|
||||
|
||||
• **relationships**: `Partial`<`Record`<[`NodeRelationship`](../enums/NodeRelationship.md), [`RelatedNodeType`](../modules.md#relatednodetype)\>\> = `{}`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[relationships](TextNode.md#relationships)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L52)
|
||||
|
||||
___
|
||||
|
||||
### startCharIdx
|
||||
|
||||
• `Optional` **startCharIdx**: `number`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[startCharIdx](TextNode.md#startcharidx)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:151](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L151)
|
||||
|
||||
___
|
||||
|
||||
### text
|
||||
|
||||
• **text**: `string` = `""`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[text](TextNode.md#text)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:150](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L150)
|
||||
|
||||
## Accessors
|
||||
|
||||
### childNodes
|
||||
|
||||
• `get` **childNodes**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TextNode.childNodes
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:107](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L107)
|
||||
|
||||
___
|
||||
|
||||
### nextNode
|
||||
|
||||
• `get` **nextNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TextNode.nextNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:87](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L87)
|
||||
|
||||
___
|
||||
|
||||
### parentNode
|
||||
|
||||
• `get` **parentNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TextNode.parentNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L97)
|
||||
|
||||
___
|
||||
|
||||
### prevNode
|
||||
|
||||
• `get` **prevNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TextNode.prevNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L75)
|
||||
|
||||
___
|
||||
|
||||
### sourceNode
|
||||
|
||||
• `get` **sourceNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TextNode.sourceNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L65)
|
||||
|
||||
## Methods
|
||||
|
||||
### asRelatedNodeInfo
|
||||
|
||||
▸ **asRelatedNodeInfo**(): [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[asRelatedNodeInfo](TextNode.md#asrelatednodeinfo)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:129](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L129)
|
||||
|
||||
___
|
||||
|
||||
### generateHash
|
||||
|
||||
▸ **generateHash**(): `string`
|
||||
|
||||
Generate a hash of the text node.
|
||||
The ID is not part of the hash as it can change independent of content.
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[generateHash](TextNode.md#generatehash)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:173](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L173)
|
||||
|
||||
___
|
||||
|
||||
### getContent
|
||||
|
||||
▸ **getContent**(`metadataMode?`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `metadataMode` | [`MetadataMode`](../enums/MetadataMode.md) | `MetadataMode.NONE` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[getContent](TextNode.md#getcontent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:187](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L187)
|
||||
|
||||
___
|
||||
|
||||
### getEmbedding
|
||||
|
||||
▸ **getEmbedding**(): `number`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[getEmbedding](TextNode.md#getembedding)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:121](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L121)
|
||||
|
||||
___
|
||||
|
||||
### getMetadataStr
|
||||
|
||||
▸ **getMetadataStr**(`metadataMode`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `metadataMode` | [`MetadataMode`](../enums/MetadataMode.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[getMetadataStr](TextNode.md#getmetadatastr)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:192](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L192)
|
||||
|
||||
___
|
||||
|
||||
### getNodeInfo
|
||||
|
||||
▸ **getNodeInfo**(): `Object`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Object`
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `end` | `undefined` \| `number` |
|
||||
| `start` | `undefined` \| `number` |
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[getNodeInfo](TextNode.md#getnodeinfo)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:219](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L219)
|
||||
|
||||
___
|
||||
|
||||
### getText
|
||||
|
||||
▸ **getText**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[getText](TextNode.md#gettext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:223](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L223)
|
||||
|
||||
___
|
||||
|
||||
### getType
|
||||
|
||||
▸ **getType**(): [`ObjectType`](../enums/ObjectType.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ObjectType`](../enums/ObjectType.md)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[TextNode](TextNode.md).[getType](TextNode.md#gettype)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:248](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L248)
|
||||
|
||||
___
|
||||
|
||||
### setContent
|
||||
|
||||
▸ **setContent**(`value`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `value` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[setContent](TextNode.md#setcontent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:213](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L213)
|
||||
|
||||
___
|
||||
|
||||
### toJSON
|
||||
|
||||
▸ **toJSON**(): `Record`<`string`, `any`\>
|
||||
|
||||
Used with built in JSON.stringify
|
||||
|
||||
#### Returns
|
||||
|
||||
`Record`<`string`, `any`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[TextNode](TextNode.md).[toJSON](TextNode.md#tojson)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:141](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L141)
|
||||
@@ -1,82 +0,0 @@
|
||||
---
|
||||
id: "IndexStruct"
|
||||
title: "Class: IndexStruct"
|
||||
sidebar_label: "IndexStruct"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
The underlying structure of each index.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`IndexStruct`**
|
||||
|
||||
↳ [`IndexDict`](IndexDict.md)
|
||||
|
||||
↳ [`IndexList`](IndexList.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new IndexStruct**(`indexId?`, `summary?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `indexId` | `string` | `undefined` |
|
||||
| `summary` | `undefined` | `undefined` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L19)
|
||||
|
||||
## Properties
|
||||
|
||||
### indexId
|
||||
|
||||
• **indexId**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### summary
|
||||
|
||||
• `Optional` **summary**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L17)
|
||||
|
||||
## Methods
|
||||
|
||||
### getSummary
|
||||
|
||||
▸ **getSummary**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### toJson
|
||||
|
||||
▸ **toJson**(): `Record`<`string`, `unknown`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Record`<`string`, `unknown`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L24)
|
||||
@@ -1,84 +0,0 @@
|
||||
---
|
||||
id: "LLMQuestionGenerator"
|
||||
title: "Class: LLMQuestionGenerator"
|
||||
sidebar_label: "LLMQuestionGenerator"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
LLMQuestionGenerator uses the LLM to generate new questions for the LLM using tools and a user query.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseQuestionGenerator`](../interfaces/BaseQuestionGenerator.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new LLMQuestionGenerator**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Partial`<[`LLMQuestionGenerator`](LLMQuestionGenerator.md)\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QuestionGenerator.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L34)
|
||||
|
||||
## Properties
|
||||
|
||||
### llm
|
||||
|
||||
• **llm**: [`LLM`](../interfaces/LLM.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QuestionGenerator.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L30)
|
||||
|
||||
___
|
||||
|
||||
### outputParser
|
||||
|
||||
• **outputParser**: [`BaseOutputParser`](../interfaces/BaseOutputParser.md)<[`StructuredOutput`](../interfaces/StructuredOutput.md)<[`SubQuestion`](../interfaces/SubQuestion.md)[]\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QuestionGenerator.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
### prompt
|
||||
|
||||
• **prompt**: [`SimplePrompt`](../modules.md#simpleprompt)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QuestionGenerator.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L31)
|
||||
|
||||
## Methods
|
||||
|
||||
### generate
|
||||
|
||||
▸ **generate**(`tools`, `query`): `Promise`<[`SubQuestion`](../interfaces/SubQuestion.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `tools` | [`ToolMetadata`](../interfaces/ToolMetadata.md)[] |
|
||||
| `query` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`SubQuestion`](../interfaces/SubQuestion.md)[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseQuestionGenerator](../interfaces/BaseQuestionGenerator.md).[generate](../interfaces/BaseQuestionGenerator.md#generate)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QuestionGenerator.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L40)
|
||||
@@ -1,350 +0,0 @@
|
||||
---
|
||||
id: "ListIndex"
|
||||
title: "Class: ListIndex"
|
||||
sidebar_label: "ListIndex"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A ListIndex keeps nodes in a sequential list structure
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`BaseIndex`](BaseIndex.md)<[`IndexList`](IndexList.md)\>
|
||||
|
||||
↳ **`ListIndex`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new ListIndex**(`init`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init` | [`BaseIndexInit`](../interfaces/BaseIndexInit.md)<[`IndexList`](IndexList.md)\> |
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[constructor](BaseIndex.md#constructor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L47)
|
||||
|
||||
## Properties
|
||||
|
||||
### docStore
|
||||
|
||||
• **docStore**: `BaseDocumentStore`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[docStore](BaseIndex.md#docstore)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:125](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L125)
|
||||
|
||||
___
|
||||
|
||||
### indexStore
|
||||
|
||||
• `Optional` **indexStore**: `BaseIndexStore`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[indexStore](BaseIndex.md#indexstore)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:127](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L127)
|
||||
|
||||
___
|
||||
|
||||
### indexStruct
|
||||
|
||||
• **indexStruct**: [`IndexList`](IndexList.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[indexStruct](BaseIndex.md#indexstruct)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:128](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L128)
|
||||
|
||||
___
|
||||
|
||||
### serviceContext
|
||||
|
||||
• **serviceContext**: [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[serviceContext](BaseIndex.md#servicecontext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:123](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L123)
|
||||
|
||||
___
|
||||
|
||||
### storageContext
|
||||
|
||||
• **storageContext**: [`StorageContext`](../interfaces/StorageContext.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[storageContext](BaseIndex.md#storagecontext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L124)
|
||||
|
||||
___
|
||||
|
||||
### vectorStore
|
||||
|
||||
• `Optional` **vectorStore**: [`VectorStore`](../interfaces/VectorStore.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[vectorStore](BaseIndex.md#vectorstore)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:126](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L126)
|
||||
|
||||
## Methods
|
||||
|
||||
### asQueryEngine
|
||||
|
||||
▸ **asQueryEngine**(`options?`): [`BaseQueryEngine`](../interfaces/BaseQueryEngine.md)
|
||||
|
||||
Create a new query engine from the index. It will also create a retriever
|
||||
and response synthezier if they are not provided.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `options?` | `Object` | you can supply your own custom Retriever and ResponseSynthesizer |
|
||||
| `options.responseSynthesizer?` | [`ResponseSynthesizer`](ResponseSynthesizer.md) | - |
|
||||
| `options.retriever?` | [`BaseRetriever`](../interfaces/BaseRetriever.md) | - |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`BaseQueryEngine`](../interfaces/BaseQueryEngine.md)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[asQueryEngine](BaseIndex.md#asqueryengine)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:155](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L155)
|
||||
|
||||
___
|
||||
|
||||
### asRetriever
|
||||
|
||||
▸ **asRetriever**(`options?`): [`BaseRetriever`](../interfaces/BaseRetriever.md)
|
||||
|
||||
Create a new retriever from the index.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `options?` | `Object` |
|
||||
| `options.mode` | [`ListRetrieverMode`](../enums/ListRetrieverMode.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`BaseRetriever`](../interfaces/BaseRetriever.md)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[asRetriever](BaseIndex.md#asretriever)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:142](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L142)
|
||||
|
||||
___
|
||||
|
||||
### deleteNodes
|
||||
|
||||
▸ **deleteNodes**(`nodeIds`, `deleteFromDocStore`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `nodeIds` | `string`[] |
|
||||
| `deleteFromDocStore` | `boolean` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:216](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L216)
|
||||
|
||||
___
|
||||
|
||||
### deleteRefDoc
|
||||
|
||||
▸ **deleteRefDoc**(`refDocId`, `deleteFromDocStore?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `refDocId` | `string` |
|
||||
| `deleteFromDocStore?` | `boolean` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[deleteRefDoc](BaseIndex.md#deleterefdoc)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:197](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L197)
|
||||
|
||||
___
|
||||
|
||||
### getRefDocInfo
|
||||
|
||||
▸ **getRefDocInfo**(): `Promise`<`Record`<`string`, `RefDocInfo`\>\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Record`<`string`, `RefDocInfo`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:230](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L230)
|
||||
|
||||
___
|
||||
|
||||
### insert
|
||||
|
||||
▸ **insert**(`document`): `Promise`<`void`\>
|
||||
|
||||
Insert a document into the index.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `document` | [`Document`](Document.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[insert](BaseIndex.md#insert)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:159](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L159)
|
||||
|
||||
___
|
||||
|
||||
### insertNodes
|
||||
|
||||
▸ **insertNodes**(`nodes`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `nodes` | [`BaseNode`](BaseNode.md)[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[insertNodes](BaseIndex.md#insertnodes)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:191](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L191)
|
||||
|
||||
___
|
||||
|
||||
### buildIndexFromNodes
|
||||
|
||||
▸ `Static` **buildIndexFromNodes**(`nodes`, `docStore`, `indexStruct?`): `Promise`<[`IndexList`](IndexList.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `nodes` | [`BaseNode`](BaseNode.md)[] |
|
||||
| `docStore` | `BaseDocumentStore` |
|
||||
| `indexStruct?` | [`IndexList`](IndexList.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IndexList`](IndexList.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:176](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L176)
|
||||
|
||||
___
|
||||
|
||||
### fromDocuments
|
||||
|
||||
▸ `Static` **fromDocuments**(`documents`, `args?`): `Promise`<[`ListIndex`](ListIndex.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `documents` | [`Document`](Document.md)[] |
|
||||
| `args` | `Object` |
|
||||
| `args.serviceContext?` | [`ServiceContext`](../interfaces/ServiceContext.md) |
|
||||
| `args.storageContext?` | [`StorageContext`](../interfaces/StorageContext.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ListIndex`](ListIndex.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L116)
|
||||
|
||||
___
|
||||
|
||||
### init
|
||||
|
||||
▸ `Static` **init**(`options`): `Promise`<[`ListIndex`](ListIndex.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `options` | `ListIndexOptions` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ListIndex`](ListIndex.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:51](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L51)
|
||||
@@ -1,137 +0,0 @@
|
||||
---
|
||||
id: "ListIndexLLMRetriever"
|
||||
title: "Class: ListIndexLLMRetriever"
|
||||
sidebar_label: "ListIndexLLMRetriever"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
LLM retriever for ListIndex.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseRetriever`](../interfaces/BaseRetriever.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new ListIndexLLMRetriever**(`index`, `choiceSelectPrompt?`, `choiceBatchSize?`, `formatNodeBatchFn?`, `parseChoiceSelectAnswerFn?`, `serviceContext?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `index` | [`ListIndex`](ListIndex.md) | `undefined` |
|
||||
| `choiceSelectPrompt?` | [`SimplePrompt`](../modules.md#simpleprompt) | `undefined` |
|
||||
| `choiceBatchSize` | `number` | `10` |
|
||||
| `formatNodeBatchFn?` | `NodeFormatterFunction` | `undefined` |
|
||||
| `parseChoiceSelectAnswerFn?` | `ChoiceSelectParserFunction` | `undefined` |
|
||||
| `serviceContext?` | [`ServiceContext`](../interfaces/ServiceContext.md) | `undefined` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:64](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L64)
|
||||
|
||||
## Properties
|
||||
|
||||
### choiceBatchSize
|
||||
|
||||
• **choiceBatchSize**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:59](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
### choiceSelectPrompt
|
||||
|
||||
• **choiceSelectPrompt**: [`SimplePrompt`](../modules.md#simpleprompt)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L58)
|
||||
|
||||
___
|
||||
|
||||
### formatNodeBatchFn
|
||||
|
||||
• **formatNodeBatchFn**: `NodeFormatterFunction`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:60](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L60)
|
||||
|
||||
___
|
||||
|
||||
### index
|
||||
|
||||
• **index**: [`ListIndex`](ListIndex.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:57](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L57)
|
||||
|
||||
___
|
||||
|
||||
### parseChoiceSelectAnswerFn
|
||||
|
||||
• **parseChoiceSelectAnswerFn**: `ChoiceSelectParserFunction`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:61](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L61)
|
||||
|
||||
___
|
||||
|
||||
### serviceContext
|
||||
|
||||
• **serviceContext**: [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L62)
|
||||
|
||||
## Methods
|
||||
|
||||
### getServiceContext
|
||||
|
||||
▸ **getServiceContext**(): [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseRetriever](../interfaces/BaseRetriever.md).[getServiceContext](../interfaces/BaseRetriever.md#getservicecontext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:127](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L127)
|
||||
|
||||
___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`query`, `parentEvent?`): `Promise`<[`NodeWithScore`](../interfaces/NodeWithScore.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`NodeWithScore`](../interfaces/NodeWithScore.md)[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseRetriever](../interfaces/BaseRetriever.md).[retrieve](../interfaces/BaseRetriever.md#retrieve)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:81](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L81)
|
||||
@@ -1,82 +0,0 @@
|
||||
---
|
||||
id: "ListIndexRetriever"
|
||||
title: "Class: ListIndexRetriever"
|
||||
sidebar_label: "ListIndexRetriever"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Simple retriever for ListIndex that returns all nodes
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseRetriever`](../interfaces/BaseRetriever.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new ListIndexRetriever**(`index`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `index` | [`ListIndex`](ListIndex.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L22)
|
||||
|
||||
## Properties
|
||||
|
||||
### index
|
||||
|
||||
• **index**: [`ListIndex`](ListIndex.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L20)
|
||||
|
||||
## Methods
|
||||
|
||||
### getServiceContext
|
||||
|
||||
▸ **getServiceContext**(): [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseRetriever](../interfaces/BaseRetriever.md).[getServiceContext](../interfaces/BaseRetriever.md#getservicecontext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L48)
|
||||
|
||||
___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`query`, `parentEvent?`): `Promise`<[`NodeWithScore`](../interfaces/NodeWithScore.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`NodeWithScore`](../interfaces/NodeWithScore.md)[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseRetriever](../interfaces/BaseRetriever.md).[retrieve](../interfaces/BaseRetriever.md#retrieve)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndexRetriever.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndexRetriever.ts#L26)
|
||||
@@ -1,241 +0,0 @@
|
||||
---
|
||||
id: "LlamaDeuce"
|
||||
title: "Class: LlamaDeuce"
|
||||
sidebar_label: "LlamaDeuce"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Llama2 LLM implementation
|
||||
|
||||
## Implements
|
||||
|
||||
- [`LLM`](../interfaces/LLM.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new LlamaDeuce**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Partial`<[`LlamaDeuce`](LlamaDeuce.md)\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:266](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L266)
|
||||
|
||||
## Properties
|
||||
|
||||
### chatStrategy
|
||||
|
||||
• **chatStrategy**: [`DeuceChatStrategy`](../enums/DeuceChatStrategy.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:260](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L260)
|
||||
|
||||
___
|
||||
|
||||
### maxTokens
|
||||
|
||||
• `Optional` **maxTokens**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:263](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L263)
|
||||
|
||||
___
|
||||
|
||||
### model
|
||||
|
||||
• **model**: ``"Llama-2-70b-chat-old"`` \| ``"Llama-2-70b-chat-4bit"`` \| ``"Llama-2-13b-chat"`` \| ``"Llama-2-13b-chat-4bit"`` \| ``"Llama-2-7b-chat"`` \| ``"Llama-2-7b-chat-4bit"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:259](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L259)
|
||||
|
||||
___
|
||||
|
||||
### replicateSession
|
||||
|
||||
• **replicateSession**: `ReplicateSession`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:264](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L264)
|
||||
|
||||
___
|
||||
|
||||
### temperature
|
||||
|
||||
• **temperature**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:261](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L261)
|
||||
|
||||
___
|
||||
|
||||
### topP
|
||||
|
||||
• **topP**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:262](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L262)
|
||||
|
||||
## Methods
|
||||
|
||||
### chat
|
||||
|
||||
▸ **chat**(`messages`, `_parentEvent?`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
Get a chat response from the LLM
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
|
||||
| `_parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[LLM](../interfaces/LLM.md).[chat](../interfaces/LLM.md#chat)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:385](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L385)
|
||||
|
||||
___
|
||||
|
||||
### complete
|
||||
|
||||
▸ **complete**(`prompt`, `parentEvent?`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
Get a prompt completion from the LLM
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `prompt` | `string` | the prompt to complete |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) | - |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[LLM](../interfaces/LLM.md).[complete](../interfaces/LLM.md#complete)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:422](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L422)
|
||||
|
||||
___
|
||||
|
||||
### mapMessageTypeA16Z
|
||||
|
||||
▸ **mapMessageTypeA16Z**(`messageType`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `messageType` | [`MessageType`](../modules.md#messagetype) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:309](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L309)
|
||||
|
||||
___
|
||||
|
||||
### mapMessagesToPrompt
|
||||
|
||||
▸ **mapMessagesToPrompt**(`messages`): `Object`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Object`
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `prompt` | `string` |
|
||||
| `systemPrompt` | `undefined` \| `string` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:281](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L281)
|
||||
|
||||
___
|
||||
|
||||
### mapMessagesToPromptA16Z
|
||||
|
||||
▸ **mapMessagesToPromptA16Z**(`messages`): `Object`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Object`
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `prompt` | `string` |
|
||||
| `systemPrompt` | `undefined` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:295](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L295)
|
||||
|
||||
___
|
||||
|
||||
### mapMessagesToPromptMeta
|
||||
|
||||
▸ **mapMessagesToPromptMeta**(`messages`, `opts?`): `Object`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
|
||||
| `opts?` | `Object` |
|
||||
| `opts.replicate4Bit?` | `boolean` |
|
||||
| `opts.withBos?` | `boolean` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Object`
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `prompt` | `string` |
|
||||
| `systemPrompt` | `undefined` \| `string` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:322](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L322)
|
||||
@@ -1,193 +0,0 @@
|
||||
---
|
||||
id: "OpenAI"
|
||||
title: "Class: OpenAI"
|
||||
sidebar_label: "OpenAI"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
OpenAI LLM implementation
|
||||
|
||||
## Implements
|
||||
|
||||
- [`LLM`](../interfaces/LLM.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new OpenAI**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Partial`<[`OpenAI`](OpenAI.md)\> & { `azure?`: `AzureOpenAIConfig` } |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:94](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L94)
|
||||
|
||||
## Properties
|
||||
|
||||
### apiKey
|
||||
|
||||
• `Optional` **apiKey**: `string` = `undefined`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:87](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L87)
|
||||
|
||||
___
|
||||
|
||||
### callbackManager
|
||||
|
||||
• `Optional` **callbackManager**: [`CallbackManager`](CallbackManager.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:92](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L92)
|
||||
|
||||
___
|
||||
|
||||
### maxRetries
|
||||
|
||||
• **maxRetries**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:88](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L88)
|
||||
|
||||
___
|
||||
|
||||
### maxTokens
|
||||
|
||||
• `Optional` **maxTokens**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:84](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L84)
|
||||
|
||||
___
|
||||
|
||||
### model
|
||||
|
||||
• **model**: ``"gpt-3.5-turbo"`` \| ``"gpt-3.5-turbo-16k"`` \| ``"gpt-4"`` \| ``"gpt-4-32k"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:81](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L81)
|
||||
|
||||
___
|
||||
|
||||
### session
|
||||
|
||||
• **session**: `OpenAISession`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:90](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L90)
|
||||
|
||||
___
|
||||
|
||||
### temperature
|
||||
|
||||
• **temperature**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:82](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L82)
|
||||
|
||||
___
|
||||
|
||||
### timeout
|
||||
|
||||
• `Optional` **timeout**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L89)
|
||||
|
||||
___
|
||||
|
||||
### topP
|
||||
|
||||
• **topP**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:83](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L83)
|
||||
|
||||
## Methods
|
||||
|
||||
### chat
|
||||
|
||||
▸ **chat**(`messages`, `parentEvent?`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
Get a chat response from the LLM
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `messages` | [`ChatMessage`](../interfaces/ChatMessage.md)[] |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[LLM](../interfaces/LLM.md).[chat](../interfaces/LLM.md#chat)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L157)
|
||||
|
||||
___
|
||||
|
||||
### complete
|
||||
|
||||
▸ **complete**(`prompt`, `parentEvent?`): `Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
Get a prompt completion from the LLM
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `prompt` | `string` | the prompt to complete |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) | - |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ChatResponse`](../interfaces/ChatResponse.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[LLM](../interfaces/LLM.md).[complete](../interfaces/LLM.md#complete)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:197](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L197)
|
||||
|
||||
___
|
||||
|
||||
### mapMessageType
|
||||
|
||||
▸ **mapMessageType**(`messageType`): ``"function"`` \| ``"user"`` \| ``"assistant"`` \| ``"system"``
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `messageType` | [`MessageType`](../modules.md#messagetype) |
|
||||
|
||||
#### Returns
|
||||
|
||||
``"function"`` \| ``"user"`` \| ``"assistant"`` \| ``"system"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:140](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L140)
|
||||
@@ -1,177 +0,0 @@
|
||||
---
|
||||
id: "OpenAIEmbedding"
|
||||
title: "Class: OpenAIEmbedding"
|
||||
sidebar_label: "OpenAIEmbedding"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`BaseEmbedding`](BaseEmbedding.md)
|
||||
|
||||
↳ **`OpenAIEmbedding`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new OpenAIEmbedding**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Partial`<[`OpenAIEmbedding`](OpenAIEmbedding.md)\> & { `azure?`: `AzureOpenAIConfig` } |
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseEmbedding](BaseEmbedding.md).[constructor](BaseEmbedding.md#constructor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:229](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L229)
|
||||
|
||||
## Properties
|
||||
|
||||
### apiKey
|
||||
|
||||
• `Optional` **apiKey**: `string` = `undefined`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:224](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L224)
|
||||
|
||||
___
|
||||
|
||||
### maxRetries
|
||||
|
||||
• **maxRetries**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:225](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L225)
|
||||
|
||||
___
|
||||
|
||||
### model
|
||||
|
||||
• **model**: `TEXT_EMBED_ADA_002`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:221](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L221)
|
||||
|
||||
___
|
||||
|
||||
### session
|
||||
|
||||
• **session**: `OpenAISession`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:227](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L227)
|
||||
|
||||
___
|
||||
|
||||
### timeout
|
||||
|
||||
• `Optional` **timeout**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:226](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L226)
|
||||
|
||||
## Methods
|
||||
|
||||
### getOpenAIEmbedding
|
||||
|
||||
▸ `Private` **getOpenAIEmbedding**(`input`): `Promise`<`number`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `input` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`number`[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:272](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L272)
|
||||
|
||||
___
|
||||
|
||||
### getQueryEmbedding
|
||||
|
||||
▸ **getQueryEmbedding**(`query`): `Promise`<`number`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`number`[]\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseEmbedding](BaseEmbedding.md).[getQueryEmbedding](BaseEmbedding.md#getqueryembedding)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:288](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L288)
|
||||
|
||||
___
|
||||
|
||||
### getTextEmbedding
|
||||
|
||||
▸ **getTextEmbedding**(`text`): `Promise`<`number`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `text` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`number`[]\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseEmbedding](BaseEmbedding.md).[getTextEmbedding](BaseEmbedding.md#gettextembedding)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:284](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L284)
|
||||
|
||||
___
|
||||
|
||||
### similarity
|
||||
|
||||
▸ **similarity**(`embedding1`, `embedding2`, `mode?`): `number`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `embedding1` | `number`[] | `undefined` |
|
||||
| `embedding2` | `number`[] | `undefined` |
|
||||
| `mode` | [`SimilarityType`](../enums/SimilarityType.md) | `SimilarityType.DEFAULT` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseEmbedding](BaseEmbedding.md).[similarity](BaseEmbedding.md#similarity)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:204](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L204)
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
id: "PDFReader"
|
||||
title: "Class: PDFReader"
|
||||
sidebar_label: "PDFReader"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Read the text of a PDF
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseReader`](../interfaces/BaseReader.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new PDFReader**()
|
||||
|
||||
## Methods
|
||||
|
||||
### loadData
|
||||
|
||||
▸ **loadData**(`file`, `fs?`): `Promise`<[`Document`](Document.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `file` | `string` | `undefined` |
|
||||
| `fs` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) | `DEFAULT_FS` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Document`](Document.md)[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseReader](../interfaces/BaseReader.md).[loadData](../interfaces/BaseReader.md#loaddata)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[readers/PDFReader.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/PDFReader.ts#L11)
|
||||
@@ -1,105 +0,0 @@
|
||||
---
|
||||
id: "PapaCSVReader"
|
||||
title: "Class: PapaCSVReader"
|
||||
sidebar_label: "PapaCSVReader"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
papaparse-based csv parser
|
||||
|
||||
**`Implements`**
|
||||
|
||||
BaseReader
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseReader`](../interfaces/BaseReader.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new PapaCSVReader**(`concatRows?`, `colJoiner?`, `rowJoiner?`, `papaConfig?`)
|
||||
|
||||
Constructs a new instance of the class.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| :------ | :------ | :------ | :------ |
|
||||
| `concatRows?` | `boolean` | `true` | whether to concatenate all rows into one document.If set to False, a Document will be created for each row.True by default. |
|
||||
| `colJoiner?` | `string` | `", "` | - |
|
||||
| `rowJoiner?` | `string` | `"\n"` | Separator to use for joining each row.Only used when `concat_rows=True`.Set to "\n" by default. |
|
||||
| `papaConfig?` | `ParseConfig`<`any`, `undefined`\> | `undefined` | - |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[readers/CSVReader.ts:23](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/CSVReader.ts#L23)
|
||||
|
||||
## Properties
|
||||
|
||||
### colJoiner
|
||||
|
||||
• `Private` **colJoiner**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[readers/CSVReader.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/CSVReader.ts#L13)
|
||||
|
||||
___
|
||||
|
||||
### concatRows
|
||||
|
||||
• `Private` **concatRows**: `boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[readers/CSVReader.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/CSVReader.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
### papaConfig
|
||||
|
||||
• `Private` `Optional` **papaConfig**: `ParseConfig`<`any`, `undefined`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[readers/CSVReader.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/CSVReader.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### rowJoiner
|
||||
|
||||
• `Private` **rowJoiner**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[readers/CSVReader.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/CSVReader.ts#L14)
|
||||
|
||||
## Methods
|
||||
|
||||
### loadData
|
||||
|
||||
▸ **loadData**(`file`, `fs?`): `Promise`<[`Document`](Document.md)[]\>
|
||||
|
||||
Loads data from csv files
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| :------ | :------ | :------ | :------ |
|
||||
| `file` | `string` | `undefined` | The path to the file to load. |
|
||||
| `fs?` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) | `DEFAULT_FS` | The file system to use for reading the file. |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Document`](Document.md)[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseReader](../interfaces/BaseReader.md).[loadData](../interfaces/BaseReader.md#loaddata)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[readers/CSVReader.ts:41](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/CSVReader.ts#L41)
|
||||
@@ -1,139 +0,0 @@
|
||||
---
|
||||
id: "Refine"
|
||||
title: "Class: Refine"
|
||||
sidebar_label: "Refine"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A response builder that uses the query to ask the LLM generate a better response using multiple text chunks.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`Refine`**
|
||||
|
||||
↳ [`CompactAndRefine`](CompactAndRefine.md)
|
||||
|
||||
## Implements
|
||||
|
||||
- `BaseResponseBuilder`
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new Refine**(`serviceContext`, `textQATemplate?`, `refineTemplate?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `serviceContext` | [`ServiceContext`](../interfaces/ServiceContext.md) |
|
||||
| `textQATemplate?` | [`SimplePrompt`](../modules.md#simpleprompt) |
|
||||
| `refineTemplate?` | [`SimplePrompt`](../modules.md#simpleprompt) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:78](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L78)
|
||||
|
||||
## Properties
|
||||
|
||||
### refineTemplate
|
||||
|
||||
• **refineTemplate**: [`SimplePrompt`](../modules.md#simpleprompt)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:76](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L76)
|
||||
|
||||
___
|
||||
|
||||
### serviceContext
|
||||
|
||||
• **serviceContext**: [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L74)
|
||||
|
||||
___
|
||||
|
||||
### textQATemplate
|
||||
|
||||
• **textQATemplate**: [`SimplePrompt`](../modules.md#simpleprompt)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L75)
|
||||
|
||||
## Methods
|
||||
|
||||
### getResponse
|
||||
|
||||
▸ **getResponse**(`query`, `textChunks`, `parentEvent?`, `prevResponse?`): `Promise`<`string`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `textChunks` | `string`[] |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
| `prevResponse?` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
BaseResponseBuilder.getResponse
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:88](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L88)
|
||||
|
||||
___
|
||||
|
||||
### giveResponseSingle
|
||||
|
||||
▸ `Private` **giveResponseSingle**(`queryStr`, `textChunk`, `parentEvent?`): `Promise`<`string`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `queryStr` | `string` |
|
||||
| `textChunk` | `string` |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:113](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L113)
|
||||
|
||||
___
|
||||
|
||||
### refineResponseSingle
|
||||
|
||||
▸ `Private` **refineResponseSingle**(`response`, `queryStr`, `textChunk`, `parentEvent?`): `Promise`<`string`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `response` | `string` |
|
||||
| `queryStr` | `string` |
|
||||
| `textChunk` | `string` |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:149](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L149)
|
||||
@@ -1,74 +0,0 @@
|
||||
---
|
||||
id: "Response"
|
||||
title: "Class: Response"
|
||||
sidebar_label: "Response"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Respone is the output of a LLM
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new Response**(`response`, `sourceNodes?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `response` | `string` |
|
||||
| `sourceNodes?` | [`BaseNode`](BaseNode.md)[] |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Response.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Response.ts#L10)
|
||||
|
||||
## Properties
|
||||
|
||||
### response
|
||||
|
||||
• **response**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Response.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Response.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
### sourceNodes
|
||||
|
||||
• `Optional` **sourceNodes**: [`BaseNode`](BaseNode.md)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Response.ts:8](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Response.ts#L8)
|
||||
|
||||
## Methods
|
||||
|
||||
### getFormattedSources
|
||||
|
||||
▸ **getFormattedSources**(): `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Response.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Response.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### toString
|
||||
|
||||
▸ **toString**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Response.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Response.ts#L19)
|
||||
@@ -1,69 +0,0 @@
|
||||
---
|
||||
id: "ResponseSynthesizer"
|
||||
title: "Class: ResponseSynthesizer"
|
||||
sidebar_label: "ResponseSynthesizer"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A ResponseSynthesizer is used to generate a response from a query and a list of nodes.
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new ResponseSynthesizer**(`«destructured»?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `«destructured»` | `Object` |
|
||||
| › `responseBuilder?` | `BaseResponseBuilder` |
|
||||
| › `serviceContext?` | [`ServiceContext`](../interfaces/ServiceContext.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:285](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L285)
|
||||
|
||||
## Properties
|
||||
|
||||
### responseBuilder
|
||||
|
||||
• **responseBuilder**: `BaseResponseBuilder`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:282](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L282)
|
||||
|
||||
___
|
||||
|
||||
### serviceContext
|
||||
|
||||
• **serviceContext**: [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:283](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L283)
|
||||
|
||||
## Methods
|
||||
|
||||
### synthesize
|
||||
|
||||
▸ **synthesize**(`query`, `nodes`, `parentEvent?`): `Promise`<[`Response`](Response.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `nodes` | [`NodeWithScore`](../interfaces/NodeWithScore.md)[] |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Response`](Response.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:297](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L297)
|
||||
@@ -1,77 +0,0 @@
|
||||
---
|
||||
id: "RetrieverQueryEngine"
|
||||
title: "Class: RetrieverQueryEngine"
|
||||
sidebar_label: "RetrieverQueryEngine"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A query engine that uses a retriever to query an index and then synthesizes the response.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseQueryEngine`](../interfaces/BaseQueryEngine.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new RetrieverQueryEngine**(`retriever`, `responseSynthesizer?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `retriever` | [`BaseRetriever`](../interfaces/BaseRetriever.md) |
|
||||
| `responseSynthesizer?` | [`ResponseSynthesizer`](ResponseSynthesizer.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L34)
|
||||
|
||||
## Properties
|
||||
|
||||
### responseSynthesizer
|
||||
|
||||
• **responseSynthesizer**: [`ResponseSynthesizer`](ResponseSynthesizer.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
### retriever
|
||||
|
||||
• **retriever**: [`BaseRetriever`](../interfaces/BaseRetriever.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L31)
|
||||
|
||||
## Methods
|
||||
|
||||
### query
|
||||
|
||||
▸ **query**(`query`, `parentEvent?`): `Promise`<[`Response`](Response.md)\>
|
||||
|
||||
Query the query engine and get a response.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Response`](Response.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseQueryEngine](../interfaces/BaseQueryEngine.md).[query](../interfaces/BaseQueryEngine.md#query)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L45)
|
||||
@@ -1,238 +0,0 @@
|
||||
---
|
||||
id: "SentenceSplitter"
|
||||
title: "Class: SentenceSplitter"
|
||||
sidebar_label: "SentenceSplitter"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
SentenceSplitter is our default text splitter that supports splitting into sentences, paragraphs, or fixed length chunks with overlap.
|
||||
|
||||
One of the advantages of SentenceSplitter is that even in the fixed length chunks it will try to keep sentences together.
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SentenceSplitter**(`chunkSize?`, `chunkOverlap?`, `tokenizer?`, `tokenizerDecoder?`, `paragraphSeparator?`, `chunkingTokenizerFn?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `chunkSize` | `number` | `DEFAULT_CHUNK_SIZE` |
|
||||
| `chunkOverlap` | `number` | `DEFAULT_CHUNK_OVERLAP` |
|
||||
| `tokenizer` | `any` | `null` |
|
||||
| `tokenizerDecoder` | `any` | `null` |
|
||||
| `paragraphSeparator` | `string` | `"\n\n\n"` |
|
||||
| `chunkingTokenizerFn` | `any` | `undefined` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:35](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L35)
|
||||
|
||||
## Properties
|
||||
|
||||
### chunkOverlap
|
||||
|
||||
• `Private` **chunkOverlap**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L28)
|
||||
|
||||
___
|
||||
|
||||
### chunkSize
|
||||
|
||||
• `Private` **chunkSize**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L27)
|
||||
|
||||
___
|
||||
|
||||
### chunkingTokenizerFn
|
||||
|
||||
• `Private` **chunkingTokenizerFn**: `any`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
### paragraphSeparator
|
||||
|
||||
• `Private` **paragraphSeparator**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:31](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### tokenizer
|
||||
|
||||
• `Private` **tokenizer**: `any`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:29](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
### tokenizerDecoder
|
||||
|
||||
• `Private` **tokenizerDecoder**: `any`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L30)
|
||||
|
||||
## Methods
|
||||
|
||||
### combineTextSplits
|
||||
|
||||
▸ **combineTextSplits**(`newSentenceSplits`, `effectiveChunkSize`): `TextSplit`[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `newSentenceSplits` | `SplitRep`[] |
|
||||
| `effectiveChunkSize` | `number` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`TextSplit`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:155](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L155)
|
||||
|
||||
___
|
||||
|
||||
### getEffectiveChunkSize
|
||||
|
||||
▸ `Private` **getEffectiveChunkSize**(`extraInfoStr?`): `number`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `extraInfoStr?` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:74](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L74)
|
||||
|
||||
___
|
||||
|
||||
### getParagraphSplits
|
||||
|
||||
▸ **getParagraphSplits**(`text`, `effectiveChunkSize?`): `string`[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `text` | `string` |
|
||||
| `effectiveChunkSize?` | `number` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:91](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L91)
|
||||
|
||||
___
|
||||
|
||||
### getSentenceSplits
|
||||
|
||||
▸ **getSentenceSplits**(`text`, `effectiveChunkSize?`): `string`[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `text` | `string` |
|
||||
| `effectiveChunkSize?` | `number` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:117](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L117)
|
||||
|
||||
___
|
||||
|
||||
### processSentenceSplits
|
||||
|
||||
▸ `Private` **processSentenceSplits**(`sentenceSplits`, `effectiveChunkSize`): `SplitRep`[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `sentenceSplits` | `string`[] |
|
||||
| `effectiveChunkSize` | `number` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`SplitRep`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:130](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L130)
|
||||
|
||||
___
|
||||
|
||||
### splitText
|
||||
|
||||
▸ **splitText**(`text`, `extraInfoStr?`): `string`[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `text` | `string` |
|
||||
| `extraInfoStr?` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:247](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L247)
|
||||
|
||||
___
|
||||
|
||||
### splitTextWithOverlaps
|
||||
|
||||
▸ **splitTextWithOverlaps**(`text`, `extraInfoStr?`): `TextSplit`[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `text` | `string` |
|
||||
| `extraInfoStr?` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`TextSplit`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[TextSplitter.ts:219](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/TextSplitter.ts#L219)
|
||||
@@ -1,96 +0,0 @@
|
||||
---
|
||||
id: "SimpleChatEngine"
|
||||
title: "Class: SimpleChatEngine"
|
||||
sidebar_label: "SimpleChatEngine"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
SimpleChatEngine is the simplest possible chat engine. Useful for using your own custom prompts.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`ChatEngine`](../interfaces/ChatEngine.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SimpleChatEngine**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Partial`<[`SimpleChatEngine`](SimpleChatEngine.md)\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L40)
|
||||
|
||||
## Properties
|
||||
|
||||
### chatHistory
|
||||
|
||||
• **chatHistory**: [`ChatMessage`](../interfaces/ChatMessage.md)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:37](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### llm
|
||||
|
||||
• **llm**: [`LLM`](../interfaces/LLM.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:38](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L38)
|
||||
|
||||
## Methods
|
||||
|
||||
### chat
|
||||
|
||||
▸ **chat**(`message`, `chatHistory?`): `Promise`<[`Response`](Response.md)\>
|
||||
|
||||
Send message along with the class's current chat history to the LLM.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `message` | `string` | |
|
||||
| `chatHistory?` | [`ChatMessage`](../interfaces/ChatMessage.md)[] | optional chat history if you want to customize the chat history |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Response`](Response.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ChatEngine](../interfaces/ChatEngine.md).[chat](../interfaces/ChatEngine.md#chat)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### reset
|
||||
|
||||
▸ **reset**(): `void`
|
||||
|
||||
Resets the chat history so that it's empty.
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ChatEngine](../interfaces/ChatEngine.md).[reset](../interfaces/ChatEngine.md#reset)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L54)
|
||||
@@ -1,43 +0,0 @@
|
||||
---
|
||||
id: "SimpleDirectoryReader"
|
||||
title: "Class: SimpleDirectoryReader"
|
||||
sidebar_label: "SimpleDirectoryReader"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Read all of the documents in a directory. Currently supports PDF and TXT files.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseReader`](../interfaces/BaseReader.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SimpleDirectoryReader**()
|
||||
|
||||
## Methods
|
||||
|
||||
### loadData
|
||||
|
||||
▸ **loadData**(`«destructured»`): `Promise`<[`Document`](Document.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `«destructured»` | [`SimpleDirectoryReaderLoadDataProps`](../modules.md#simpledirectoryreaderloaddataprops) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Document`](Document.md)[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseReader](../interfaces/BaseReader.md).[loadData](../interfaces/BaseReader.md#loaddata)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[readers/SimpleDirectoryReader.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/SimpleDirectoryReader.ts#L39)
|
||||
@@ -1,480 +0,0 @@
|
||||
---
|
||||
id: "SimpleDocumentStore"
|
||||
title: "Class: SimpleDocumentStore"
|
||||
sidebar_label: "SimpleDocumentStore"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `KVDocumentStore`
|
||||
|
||||
↳ **`SimpleDocumentStore`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SimpleDocumentStore**(`kvStore?`, `namespace?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `kvStore?` | `SimpleKVStore` |
|
||||
| `namespace?` | `string` |
|
||||
|
||||
#### Overrides
|
||||
|
||||
KVDocumentStore.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/SimpleDocumentStore.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/SimpleDocumentStore.ts#L19)
|
||||
|
||||
## Properties
|
||||
|
||||
### kvStore
|
||||
|
||||
• `Private` **kvStore**: `SimpleKVStore`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/SimpleDocumentStore.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/SimpleDocumentStore.ts#L17)
|
||||
|
||||
## Methods
|
||||
|
||||
### addDocuments
|
||||
|
||||
▸ **addDocuments**(`docs`, `allowUpdate?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `docs` | [`BaseNode`](BaseNode.md)[] | `undefined` |
|
||||
| `allowUpdate` | `boolean` | `true` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.addDocuments
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:33](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### deleteDocument
|
||||
|
||||
▸ **deleteDocument**(`docId`, `raiseError?`, `removeRefDocNode?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `docId` | `string` | `undefined` |
|
||||
| `raiseError` | `boolean` | `true` |
|
||||
| `removeRefDocNode` | `boolean` | `true` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.deleteDocument
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:131](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L131)
|
||||
|
||||
___
|
||||
|
||||
### deleteRefDoc
|
||||
|
||||
▸ **deleteRefDoc**(`refDocId`, `raiseError?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `refDocId` | `string` | `undefined` |
|
||||
| `raiseError` | `boolean` | `true` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.deleteRefDoc
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:148](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L148)
|
||||
|
||||
___
|
||||
|
||||
### docs
|
||||
|
||||
▸ **docs**(): `Promise`<`Record`<`string`, [`BaseNode`](BaseNode.md)\>\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Record`<`string`, [`BaseNode`](BaseNode.md)\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.docs
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L24)
|
||||
|
||||
___
|
||||
|
||||
### documentExists
|
||||
|
||||
▸ **documentExists**(`docId`): `Promise`<`boolean`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `docId` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`boolean`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.documentExists
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:105](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L105)
|
||||
|
||||
___
|
||||
|
||||
### getAllRefDocInfo
|
||||
|
||||
▸ **getAllRefDocInfo**(): `Promise`<`undefined` \| `Record`<`string`, `RefDocInfo`\>\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`undefined` \| `Record`<`string`, `RefDocInfo`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.getAllRefDocInfo
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:93](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L93)
|
||||
|
||||
___
|
||||
|
||||
### getDocument
|
||||
|
||||
▸ **getDocument**(`docId`, `raiseError?`): `Promise`<`undefined` \| [`BaseNode`](BaseNode.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `docId` | `string` | `undefined` |
|
||||
| `raiseError` | `boolean` | `true` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`undefined` \| [`BaseNode`](BaseNode.md)\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.getDocument
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:73](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L73)
|
||||
|
||||
___
|
||||
|
||||
### getDocumentHash
|
||||
|
||||
▸ **getDocumentHash**(`docId`): `Promise`<`undefined` \| `string`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `docId` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`undefined` \| `string`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.getDocumentHash
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:174](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L174)
|
||||
|
||||
___
|
||||
|
||||
### getNode
|
||||
|
||||
▸ **getNode**(`nodeId`, `raiseError?`): `Promise`<[`BaseNode`](BaseNode.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `nodeId` | `string` | `undefined` |
|
||||
| `raiseError` | `boolean` | `true` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`BaseNode`](BaseNode.md)\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.getNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/types.ts:57](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/types.ts#L57)
|
||||
|
||||
___
|
||||
|
||||
### getNodeDict
|
||||
|
||||
▸ **getNodeDict**(`nodeIdDict`): `Promise`<`Record`<`number`, [`BaseNode`](BaseNode.md)\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `nodeIdDict` | `Object` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Record`<`number`, [`BaseNode`](BaseNode.md)\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.getNodeDict
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/types.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/types.ts#L65)
|
||||
|
||||
___
|
||||
|
||||
### getNodes
|
||||
|
||||
▸ **getNodes**(`nodeIds`, `raiseError?`): `Promise`<[`BaseNode`](BaseNode.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `nodeIds` | `string`[] | `undefined` |
|
||||
| `raiseError` | `boolean` | `true` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`BaseNode`](BaseNode.md)[]\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.getNodes
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/types.ts:51](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/types.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### getRefDocInfo
|
||||
|
||||
▸ **getRefDocInfo**(`refDocId`): `Promise`<`undefined` \| `RefDocInfo`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `refDocId` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`undefined` \| `RefDocInfo`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.getRefDocInfo
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:88](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L88)
|
||||
|
||||
___
|
||||
|
||||
### persist
|
||||
|
||||
▸ **persist**(`persistPath?`, `fs?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `persistPath` | `string` |
|
||||
| `fs?` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
KVDocumentStore.persist
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/SimpleDocumentStore.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/SimpleDocumentStore.ts#L52)
|
||||
|
||||
___
|
||||
|
||||
### refDocExists
|
||||
|
||||
▸ **refDocExists**(`refDocId`): `Promise`<`boolean`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `refDocId` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`boolean`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.refDocExists
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:101](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L101)
|
||||
|
||||
___
|
||||
|
||||
### setDocumentHash
|
||||
|
||||
▸ **setDocumentHash**(`docId`, `docHash`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `docId` | `string` |
|
||||
| `docHash` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVDocumentStore.setDocumentHash
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/KVDocumentStore.ts:169](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/KVDocumentStore.ts#L169)
|
||||
|
||||
___
|
||||
|
||||
### toDict
|
||||
|
||||
▸ **toDict**(): `SaveDict`
|
||||
|
||||
#### Returns
|
||||
|
||||
`SaveDict`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/SimpleDocumentStore.ts:73](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/SimpleDocumentStore.ts#L73)
|
||||
|
||||
___
|
||||
|
||||
### fromDict
|
||||
|
||||
▸ `Static` **fromDict**(`saveDict`, `namespace?`): [`SimpleDocumentStore`](SimpleDocumentStore.md)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `saveDict` | `SaveDict` |
|
||||
| `namespace?` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`SimpleDocumentStore`](SimpleDocumentStore.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/SimpleDocumentStore.ts:68](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/SimpleDocumentStore.ts#L68)
|
||||
|
||||
___
|
||||
|
||||
### fromPersistDir
|
||||
|
||||
▸ `Static` **fromPersistDir**(`persistDir?`, `namespace?`, `fsModule?`): `Promise`<[`SimpleDocumentStore`](SimpleDocumentStore.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `persistDir` | `string` | `DEFAULT_PERSIST_DIR` |
|
||||
| `namespace?` | `string` | `undefined` |
|
||||
| `fsModule?` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) | `undefined` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`SimpleDocumentStore`](SimpleDocumentStore.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/SimpleDocumentStore.ts:26](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/SimpleDocumentStore.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
### fromPersistPath
|
||||
|
||||
▸ `Static` **fromPersistPath**(`persistPath`, `namespace?`, `fs?`): `Promise`<[`SimpleDocumentStore`](SimpleDocumentStore.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `persistPath` | `string` |
|
||||
| `namespace?` | `string` |
|
||||
| `fs?` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`SimpleDocumentStore`](SimpleDocumentStore.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/docStore/SimpleDocumentStore.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/docStore/SimpleDocumentStore.ts#L42)
|
||||
@@ -1,234 +0,0 @@
|
||||
---
|
||||
id: "SimpleIndexStore"
|
||||
title: "Class: SimpleIndexStore"
|
||||
sidebar_label: "SimpleIndexStore"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `KVIndexStore`
|
||||
|
||||
↳ **`SimpleIndexStore`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SimpleIndexStore**(`kvStore?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `kvStore?` | `BaseInMemoryKVStore` |
|
||||
|
||||
#### Overrides
|
||||
|
||||
KVIndexStore.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/SimpleIndexStore.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/SimpleIndexStore.ts#L16)
|
||||
|
||||
## Properties
|
||||
|
||||
### kvStore
|
||||
|
||||
• `Private` **kvStore**: `BaseInMemoryKVStore`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/SimpleIndexStore.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/SimpleIndexStore.ts#L14)
|
||||
|
||||
## Methods
|
||||
|
||||
### addIndexStruct
|
||||
|
||||
▸ **addIndexStruct**(`indexStruct`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `indexStruct` | [`IndexStruct`](IndexStruct.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVIndexStore.addIndexStruct
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/KVIndexStore.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/KVIndexStore.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### deleteIndexStruct
|
||||
|
||||
▸ **deleteIndexStruct**(`key`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `key` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVIndexStore.deleteIndexStruct
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/KVIndexStore.ts:23](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/KVIndexStore.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
### getIndexStruct
|
||||
|
||||
▸ **getIndexStruct**(`structId?`): `Promise`<`undefined` \| [`IndexStruct`](IndexStruct.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `structId?` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`undefined` \| [`IndexStruct`](IndexStruct.md)\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVIndexStore.getIndexStruct
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/KVIndexStore.ts:27](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/KVIndexStore.ts#L27)
|
||||
|
||||
___
|
||||
|
||||
### getIndexStructs
|
||||
|
||||
▸ **getIndexStructs**(): `Promise`<[`IndexStruct`](IndexStruct.md)[]\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IndexStruct`](IndexStruct.md)[]\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
KVIndexStore.getIndexStructs
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/KVIndexStore.ts:43](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/KVIndexStore.ts#L43)
|
||||
|
||||
___
|
||||
|
||||
### persist
|
||||
|
||||
▸ **persist**(`persistPath?`, `fs?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `persistPath` | `string` | `DEFAULT_PERSIST_DIR` |
|
||||
| `fs` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) | `DEFAULT_FS` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
KVIndexStore.persist
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/SimpleIndexStore.ts:41](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/SimpleIndexStore.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
### toDict
|
||||
|
||||
▸ **toDict**(): `Record`<`string`, `unknown`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Record`<`string`, `unknown`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/SimpleIndexStore.ts:53](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/SimpleIndexStore.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### fromDict
|
||||
|
||||
▸ `Static` **fromDict**(`saveDict`): [`SimpleIndexStore`](SimpleIndexStore.md)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `saveDict` | `DataType` |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`SimpleIndexStore`](SimpleIndexStore.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/SimpleIndexStore.ts:48](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/SimpleIndexStore.ts#L48)
|
||||
|
||||
___
|
||||
|
||||
### fromPersistDir
|
||||
|
||||
▸ `Static` **fromPersistDir**(`persistDir?`, `fs?`): `Promise`<[`SimpleIndexStore`](SimpleIndexStore.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `persistDir` | `string` | `DEFAULT_PERSIST_DIR` |
|
||||
| `fs` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) | `DEFAULT_FS` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`SimpleIndexStore`](SimpleIndexStore.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/SimpleIndexStore.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/SimpleIndexStore.ts#L22)
|
||||
|
||||
___
|
||||
|
||||
### fromPersistPath
|
||||
|
||||
▸ `Static` **fromPersistPath**(`persistPath`, `fs?`): `Promise`<[`SimpleIndexStore`](SimpleIndexStore.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `persistPath` | `string` | `undefined` |
|
||||
| `fs` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) | `DEFAULT_FS` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`SimpleIndexStore`](SimpleIndexStore.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/indexStore/SimpleIndexStore.ts:33](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/indexStore/SimpleIndexStore.ts#L33)
|
||||
@@ -1,120 +0,0 @@
|
||||
---
|
||||
id: "SimpleNodeParser"
|
||||
title: "Class: SimpleNodeParser"
|
||||
sidebar_label: "SimpleNodeParser"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
SimpleNodeParser is the default NodeParser. It splits documents into TextNodes using a splitter, by default SentenceSplitter
|
||||
|
||||
## Implements
|
||||
|
||||
- [`NodeParser`](../interfaces/NodeParser.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SimpleNodeParser**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Object` |
|
||||
| `init.chunkOverlap?` | `number` |
|
||||
| `init.chunkSize?` | `number` |
|
||||
| `init.includeMetadata?` | `boolean` |
|
||||
| `init.includePrevNextRel?` | `boolean` |
|
||||
| `init.textSplitter?` | [`SentenceSplitter`](SentenceSplitter.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[NodeParser.ts:93](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L93)
|
||||
|
||||
## Properties
|
||||
|
||||
### includeMetadata
|
||||
|
||||
• **includeMetadata**: `boolean`
|
||||
|
||||
Whether to include metadata in the nodes.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[NodeParser.ts:87](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L87)
|
||||
|
||||
___
|
||||
|
||||
### includePrevNextRel
|
||||
|
||||
• **includePrevNextRel**: `boolean`
|
||||
|
||||
Whether to include previous and next relationships in the nodes.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[NodeParser.ts:91](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L91)
|
||||
|
||||
___
|
||||
|
||||
### textSplitter
|
||||
|
||||
• **textSplitter**: [`SentenceSplitter`](SentenceSplitter.md)
|
||||
|
||||
The text splitter to use.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[NodeParser.ts:83](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L83)
|
||||
|
||||
## Methods
|
||||
|
||||
### getNodesFromDocuments
|
||||
|
||||
▸ **getNodesFromDocuments**(`documents`): [`TextNode`](TextNode.md)[]
|
||||
|
||||
Generate Node objects from documents
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `documents` | [`Document`](Document.md)[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`TextNode`](TextNode.md)[]
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[NodeParser](../interfaces/NodeParser.md).[getNodesFromDocuments](../interfaces/NodeParser.md#getnodesfromdocuments)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[NodeParser.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L124)
|
||||
|
||||
___
|
||||
|
||||
### fromDefaults
|
||||
|
||||
▸ `Static` **fromDefaults**(`init?`): [`SimpleNodeParser`](SimpleNodeParser.md)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Object` |
|
||||
| `init.chunkOverlap?` | `number` |
|
||||
| `init.chunkSize?` | `number` |
|
||||
| `init.includeMetadata?` | `boolean` |
|
||||
| `init.includePrevNextRel?` | `boolean` |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`SimpleNodeParser`](SimpleNodeParser.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[NodeParser.ts:111](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/NodeParser.ts#L111)
|
||||
@@ -1,75 +0,0 @@
|
||||
---
|
||||
id: "SimpleResponseBuilder"
|
||||
title: "Class: SimpleResponseBuilder"
|
||||
sidebar_label: "SimpleResponseBuilder"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A response builder that just concatenates responses.
|
||||
|
||||
## Implements
|
||||
|
||||
- `BaseResponseBuilder`
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SimpleResponseBuilder**(`serviceContext`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `serviceContext` | [`ServiceContext`](../interfaces/ServiceContext.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L49)
|
||||
|
||||
## Properties
|
||||
|
||||
### llm
|
||||
|
||||
• **llm**: [`LLM`](../interfaces/LLM.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
### textQATemplate
|
||||
|
||||
• **textQATemplate**: [`SimplePrompt`](../modules.md#simpleprompt)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:47](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L47)
|
||||
|
||||
## Methods
|
||||
|
||||
### getResponse
|
||||
|
||||
▸ **getResponse**(`query`, `textChunks`, `parentEvent?`): `Promise`<`string`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `textChunks` | `string`[] |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
BaseResponseBuilder.getResponse
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L54)
|
||||
@@ -1,283 +0,0 @@
|
||||
---
|
||||
id: "SimpleVectorStore"
|
||||
title: "Class: SimpleVectorStore"
|
||||
sidebar_label: "SimpleVectorStore"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implements
|
||||
|
||||
- [`VectorStore`](../interfaces/VectorStore.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SimpleVectorStore**(`data?`, `fs?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `data?` | `SimpleVectorStoreData` |
|
||||
| `fs?` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:37](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L37)
|
||||
|
||||
## Properties
|
||||
|
||||
### data
|
||||
|
||||
• `Private` **data**: `SimpleVectorStoreData`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:33](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### fs
|
||||
|
||||
• `Private` **fs**: [`GenericFileSystem`](../interfaces/GenericFileSystem.md) = `DEFAULT_FS`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
### persistPath
|
||||
|
||||
• `Private` **persistPath**: `undefined` \| `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:35](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### storesText
|
||||
|
||||
• **storesText**: `boolean` = `false`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[VectorStore](../interfaces/VectorStore.md).[storesText](../interfaces/VectorStore.md#storestext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L32)
|
||||
|
||||
## Accessors
|
||||
|
||||
### client
|
||||
|
||||
• `get` **client**(): `any`
|
||||
|
||||
#### Returns
|
||||
|
||||
`any`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
VectorStore.client
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:50](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L50)
|
||||
|
||||
## Methods
|
||||
|
||||
### add
|
||||
|
||||
▸ **add**(`embeddingResults`): `Promise`<`string`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `embeddingResults` | [`BaseNode`](BaseNode.md)[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[VectorStore](../interfaces/VectorStore.md).[add](../interfaces/VectorStore.md#add)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:58](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L58)
|
||||
|
||||
___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`refDocId`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `refDocId` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[VectorStore](../interfaces/VectorStore.md).[delete](../interfaces/VectorStore.md#delete)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:77](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L77)
|
||||
|
||||
___
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**(`textId`): `Promise`<`number`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `textId` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`number`[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:54](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L54)
|
||||
|
||||
___
|
||||
|
||||
### persist
|
||||
|
||||
▸ **persist**(`persistPath?`, `fs?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `persistPath` | `string` |
|
||||
| `fs?` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[VectorStore](../interfaces/VectorStore.md).[persist](../interfaces/VectorStore.md#persist)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:146](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L146)
|
||||
|
||||
___
|
||||
|
||||
### query
|
||||
|
||||
▸ **query**(`query`): `Promise`<[`VectorStoreQueryResult`](../interfaces/VectorStoreQueryResult.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | [`VectorStoreQuery`](../interfaces/VectorStoreQuery.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`VectorStoreQueryResult`](../interfaces/VectorStoreQueryResult.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[VectorStore](../interfaces/VectorStore.md).[query](../interfaces/VectorStore.md#query)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:88](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L88)
|
||||
|
||||
___
|
||||
|
||||
### toDict
|
||||
|
||||
▸ **toDict**(): `SimpleVectorStoreData`
|
||||
|
||||
#### Returns
|
||||
|
||||
`SimpleVectorStoreData`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:196](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L196)
|
||||
|
||||
___
|
||||
|
||||
### fromDict
|
||||
|
||||
▸ `Static` **fromDict**(`saveDict`): [`SimpleVectorStore`](SimpleVectorStore.md)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `saveDict` | `SimpleVectorStoreData` |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`SimpleVectorStore`](SimpleVectorStore.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:189](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L189)
|
||||
|
||||
___
|
||||
|
||||
### fromPersistDir
|
||||
|
||||
▸ `Static` **fromPersistDir**(`persistDir?`, `fs?`): `Promise`<[`SimpleVectorStore`](SimpleVectorStore.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `persistDir` | `string` | `DEFAULT_PERSIST_DIR` |
|
||||
| `fs` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) | `DEFAULT_FS` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`SimpleVectorStore`](SimpleVectorStore.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:42](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L42)
|
||||
|
||||
___
|
||||
|
||||
### fromPersistPath
|
||||
|
||||
▸ `Static` **fromPersistPath**(`persistPath`, `fs?`): `Promise`<[`SimpleVectorStore`](SimpleVectorStore.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `persistPath` | `string` |
|
||||
| `fs?` | [`GenericFileSystem`](../interfaces/GenericFileSystem.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`SimpleVectorStore`](SimpleVectorStore.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/SimpleVectorStore.ts:159](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/SimpleVectorStore.ts#L159)
|
||||
@@ -1,67 +0,0 @@
|
||||
---
|
||||
id: "SubQuestionOutputParser"
|
||||
title: "Class: SubQuestionOutputParser"
|
||||
sidebar_label: "SubQuestionOutputParser"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
SubQuestionOutputParser is used to parse the output of the SubQuestionGenerator.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseOutputParser`](../interfaces/BaseOutputParser.md)<[`StructuredOutput`](../interfaces/StructuredOutput.md)<[`SubQuestion`](../interfaces/SubQuestion.md)[]\>\>
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SubQuestionOutputParser**()
|
||||
|
||||
## Methods
|
||||
|
||||
### format
|
||||
|
||||
▸ **format**(`output`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `output` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseOutputParser](../interfaces/BaseOutputParser.md).[format](../interfaces/BaseOutputParser.md#format)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[OutputParser.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/OutputParser.ts#L97)
|
||||
|
||||
___
|
||||
|
||||
### parse
|
||||
|
||||
▸ **parse**(`output`): [`StructuredOutput`](../interfaces/StructuredOutput.md)<[`SubQuestion`](../interfaces/SubQuestion.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `output` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`StructuredOutput`](../interfaces/StructuredOutput.md)<[`SubQuestion`](../interfaces/SubQuestion.md)[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseOutputParser](../interfaces/BaseOutputParser.md).[parse](../interfaces/BaseOutputParser.md#parse)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[OutputParser.ts:89](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/OutputParser.ts#L89)
|
||||
@@ -1,143 +0,0 @@
|
||||
---
|
||||
id: "SubQuestionQueryEngine"
|
||||
title: "Class: SubQuestionQueryEngine"
|
||||
sidebar_label: "SubQuestionQueryEngine"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
SubQuestionQueryEngine decomposes a question into subquestions and then
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseQueryEngine`](../interfaces/BaseQueryEngine.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SubQuestionQueryEngine**(`init`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init` | `Object` |
|
||||
| `init.queryEngineTools` | [`QueryEngineTool`](../interfaces/QueryEngineTool.md)[] |
|
||||
| `init.questionGen` | [`BaseQuestionGenerator`](../interfaces/BaseQuestionGenerator.md) |
|
||||
| `init.responseSynthesizer` | [`ResponseSynthesizer`](ResponseSynthesizer.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L65)
|
||||
|
||||
## Properties
|
||||
|
||||
### metadatas
|
||||
|
||||
• **metadatas**: [`ToolMetadata`](../interfaces/ToolMetadata.md)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:63](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L63)
|
||||
|
||||
___
|
||||
|
||||
### queryEngines
|
||||
|
||||
• **queryEngines**: `Record`<`string`, [`BaseQueryEngine`](../interfaces/BaseQueryEngine.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:62](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L62)
|
||||
|
||||
___
|
||||
|
||||
### questionGen
|
||||
|
||||
• **questionGen**: [`BaseQuestionGenerator`](../interfaces/BaseQuestionGenerator.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:61](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L61)
|
||||
|
||||
___
|
||||
|
||||
### responseSynthesizer
|
||||
|
||||
• **responseSynthesizer**: [`ResponseSynthesizer`](ResponseSynthesizer.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:60](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L60)
|
||||
|
||||
## Methods
|
||||
|
||||
### query
|
||||
|
||||
▸ **query**(`query`): `Promise`<[`Response`](Response.md)\>
|
||||
|
||||
Query the query engine and get a response.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Response`](Response.md)\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseQueryEngine](../interfaces/BaseQueryEngine.md).[query](../interfaces/BaseQueryEngine.md#query)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:106](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L106)
|
||||
|
||||
___
|
||||
|
||||
### querySubQ
|
||||
|
||||
▸ `Private` **querySubQ**(`subQ`, `parentEvent?`): `Promise`<``null`` \| [`NodeWithScore`](../interfaces/NodeWithScore.md)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `subQ` | [`SubQuestion`](../interfaces/SubQuestion.md) |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<``null`` \| [`NodeWithScore`](../interfaces/NodeWithScore.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:134](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L134)
|
||||
|
||||
___
|
||||
|
||||
### fromDefaults
|
||||
|
||||
▸ `Static` **fromDefaults**(`init`): [`SubQuestionQueryEngine`](SubQuestionQueryEngine.md)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init` | `Object` |
|
||||
| `init.queryEngineTools` | [`QueryEngineTool`](../interfaces/QueryEngineTool.md)[] |
|
||||
| `init.questionGen?` | [`BaseQuestionGenerator`](../interfaces/BaseQuestionGenerator.md) |
|
||||
| `init.responseSynthesizer?` | [`ResponseSynthesizer`](ResponseSynthesizer.md) |
|
||||
| `init.serviceContext?` | [`ServiceContext`](../interfaces/ServiceContext.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`SubQuestionQueryEngine`](SubQuestionQueryEngine.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:82](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L82)
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
id: "TextFileReader"
|
||||
title: "Class: TextFileReader"
|
||||
sidebar_label: "TextFileReader"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Read a .txt file
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseReader`](../interfaces/BaseReader.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new TextFileReader**()
|
||||
|
||||
## Methods
|
||||
|
||||
### loadData
|
||||
|
||||
▸ **loadData**(`file`, `fs?`): `Promise`<[`Document`](Document.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `file` | `string` |
|
||||
| `fs` | [`CompleteFileSystem`](../modules.md#completefilesystem) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Document`](Document.md)[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseReader](../interfaces/BaseReader.md).[loadData](../interfaces/BaseReader.md#loaddata)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[readers/SimpleDirectoryReader.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/SimpleDirectoryReader.ts#L13)
|
||||
@@ -1,472 +0,0 @@
|
||||
---
|
||||
id: "TextNode"
|
||||
title: "Class: TextNode"
|
||||
sidebar_label: "TextNode"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
TextNode is the default node type for text. Most common node type in LlamaIndex.TS
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`BaseNode`](BaseNode.md)
|
||||
|
||||
↳ **`TextNode`**
|
||||
|
||||
↳↳ [`IndexNode`](IndexNode.md)
|
||||
|
||||
↳↳ [`Document`](Document.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new TextNode**(`init?`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init?` | `Partial`<[`TextNode`](TextNode.md)\> |
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseNode](BaseNode.md).[constructor](BaseNode.md#constructor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L157)
|
||||
|
||||
## Properties
|
||||
|
||||
### embedding
|
||||
|
||||
• `Optional` **embedding**: `number`[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseNode](BaseNode.md).[embedding](BaseNode.md#embedding)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:46](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
### endCharIdx
|
||||
|
||||
• `Optional` **endCharIdx**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:152](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L152)
|
||||
|
||||
___
|
||||
|
||||
### excludedEmbedMetadataKeys
|
||||
|
||||
• **excludedEmbedMetadataKeys**: `string`[] = `[]`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseNode](BaseNode.md).[excludedEmbedMetadataKeys](BaseNode.md#excludedembedmetadatakeys)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:50](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L50)
|
||||
|
||||
___
|
||||
|
||||
### excludedLlmMetadataKeys
|
||||
|
||||
• **excludedLlmMetadataKeys**: `string`[] = `[]`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseNode](BaseNode.md).[excludedLlmMetadataKeys](BaseNode.md#excludedllmmetadatakeys)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:51](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### hash
|
||||
|
||||
• **hash**: `string` = `""`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseNode](BaseNode.md).[hash](BaseNode.md#hash)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:53](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### id\_
|
||||
|
||||
• **id\_**: `string`
|
||||
|
||||
The unique ID of the Node/Document. The trailing underscore is here
|
||||
to avoid collisions with the id keyword in Python.
|
||||
|
||||
Set to a UUID by default.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseNode](BaseNode.md).[id_](BaseNode.md#id_)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:45](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### metadata
|
||||
|
||||
• **metadata**: `Record`<`string`, `any`\> = `{}`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseNode](BaseNode.md).[metadata](BaseNode.md#metadata)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:49](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
### metadataSeparator
|
||||
|
||||
• **metadataSeparator**: `string` = `"\n"`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:155](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L155)
|
||||
|
||||
___
|
||||
|
||||
### relationships
|
||||
|
||||
• **relationships**: `Partial`<`Record`<[`NodeRelationship`](../enums/NodeRelationship.md), [`RelatedNodeType`](../modules.md#relatednodetype)\>\> = `{}`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseNode](BaseNode.md).[relationships](BaseNode.md#relationships)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L52)
|
||||
|
||||
___
|
||||
|
||||
### startCharIdx
|
||||
|
||||
• `Optional` **startCharIdx**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:151](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L151)
|
||||
|
||||
___
|
||||
|
||||
### text
|
||||
|
||||
• **text**: `string` = `""`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:150](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L150)
|
||||
|
||||
## Accessors
|
||||
|
||||
### childNodes
|
||||
|
||||
• `get` **childNodes**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseNode.childNodes
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:107](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L107)
|
||||
|
||||
___
|
||||
|
||||
### nextNode
|
||||
|
||||
• `get` **nextNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseNode.nextNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:87](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L87)
|
||||
|
||||
___
|
||||
|
||||
### parentNode
|
||||
|
||||
• `get` **parentNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseNode.parentNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:97](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L97)
|
||||
|
||||
___
|
||||
|
||||
### prevNode
|
||||
|
||||
• `get` **prevNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseNode.prevNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:75](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L75)
|
||||
|
||||
___
|
||||
|
||||
### sourceNode
|
||||
|
||||
• `get` **sourceNode**(): `undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseNode.sourceNode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:65](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L65)
|
||||
|
||||
## Methods
|
||||
|
||||
### asRelatedNodeInfo
|
||||
|
||||
▸ **asRelatedNodeInfo**(): [`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`RelatedNodeInfo`](../interfaces/RelatedNodeInfo.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseNode](BaseNode.md).[asRelatedNodeInfo](BaseNode.md#asrelatednodeinfo)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:129](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L129)
|
||||
|
||||
___
|
||||
|
||||
### generateHash
|
||||
|
||||
▸ **generateHash**(): `string`
|
||||
|
||||
Generate a hash of the text node.
|
||||
The ID is not part of the hash as it can change independent of content.
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseNode](BaseNode.md).[generateHash](BaseNode.md#generatehash)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:173](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L173)
|
||||
|
||||
___
|
||||
|
||||
### getContent
|
||||
|
||||
▸ **getContent**(`metadataMode?`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `metadataMode` | [`MetadataMode`](../enums/MetadataMode.md) | `MetadataMode.NONE` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseNode](BaseNode.md).[getContent](BaseNode.md#getcontent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:187](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L187)
|
||||
|
||||
___
|
||||
|
||||
### getEmbedding
|
||||
|
||||
▸ **getEmbedding**(): `number`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseNode](BaseNode.md).[getEmbedding](BaseNode.md#getembedding)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:121](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L121)
|
||||
|
||||
___
|
||||
|
||||
### getMetadataStr
|
||||
|
||||
▸ **getMetadataStr**(`metadataMode`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `metadataMode` | [`MetadataMode`](../enums/MetadataMode.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseNode](BaseNode.md).[getMetadataStr](BaseNode.md#getmetadatastr)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:192](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L192)
|
||||
|
||||
___
|
||||
|
||||
### getNodeInfo
|
||||
|
||||
▸ **getNodeInfo**(): `Object`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Object`
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `end` | `undefined` \| `number` |
|
||||
| `start` | `undefined` \| `number` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:219](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L219)
|
||||
|
||||
___
|
||||
|
||||
### getText
|
||||
|
||||
▸ **getText**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:223](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L223)
|
||||
|
||||
___
|
||||
|
||||
### getType
|
||||
|
||||
▸ **getType**(): [`ObjectType`](../enums/ObjectType.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ObjectType`](../enums/ObjectType.md)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseNode](BaseNode.md).[getType](BaseNode.md#gettype)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:183](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L183)
|
||||
|
||||
___
|
||||
|
||||
### setContent
|
||||
|
||||
▸ **setContent**(`value`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `value` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseNode](BaseNode.md).[setContent](BaseNode.md#setcontent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:213](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L213)
|
||||
|
||||
___
|
||||
|
||||
### toJSON
|
||||
|
||||
▸ **toJSON**(): `Record`<`string`, `any`\>
|
||||
|
||||
Used with built in JSON.stringify
|
||||
|
||||
#### Returns
|
||||
|
||||
`Record`<`string`, `any`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseNode](BaseNode.md).[toJSON](BaseNode.md#tojson)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:141](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L141)
|
||||
@@ -1,65 +0,0 @@
|
||||
---
|
||||
id: "TreeSummarize"
|
||||
title: "Class: TreeSummarize"
|
||||
sidebar_label: "TreeSummarize"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
TreeSummarize repacks the text chunks into the smallest possible number of chunks and then summarizes them, then recursively does so until there's one chunk left.
|
||||
|
||||
## Implements
|
||||
|
||||
- `BaseResponseBuilder`
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new TreeSummarize**(`serviceContext`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `serviceContext` | [`ServiceContext`](../interfaces/ServiceContext.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:212](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L212)
|
||||
|
||||
## Properties
|
||||
|
||||
### serviceContext
|
||||
|
||||
• **serviceContext**: [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:210](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L210)
|
||||
|
||||
## Methods
|
||||
|
||||
### getResponse
|
||||
|
||||
▸ **getResponse**(`query`, `textChunks`, `parentEvent?`): `Promise`<`string`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `textChunks` | `string`[] |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`string`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
BaseResponseBuilder.getResponse
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ResponseSynthesizer.ts:216](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ResponseSynthesizer.ts#L216)
|
||||
@@ -1,104 +0,0 @@
|
||||
---
|
||||
id: "VectorIndexRetriever"
|
||||
title: "Class: VectorIndexRetriever"
|
||||
sidebar_label: "VectorIndexRetriever"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
VectorIndexRetriever retrieves nodes from a VectorIndex.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`BaseRetriever`](../interfaces/BaseRetriever.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new VectorIndexRetriever**(`«destructured»`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `«destructured»` | `Object` |
|
||||
| › `index` | [`VectorStoreIndex`](VectorStoreIndex.md) |
|
||||
| › `similarityTopK?` | `number` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorIndexRetriever.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L22)
|
||||
|
||||
## Properties
|
||||
|
||||
### index
|
||||
|
||||
• **index**: [`VectorStoreIndex`](VectorStoreIndex.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorIndexRetriever.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
### serviceContext
|
||||
|
||||
• `Private` **serviceContext**: [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorIndexRetriever.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
### similarityTopK
|
||||
|
||||
• **similarityTopK**: `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorIndexRetriever.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L19)
|
||||
|
||||
## Methods
|
||||
|
||||
### getServiceContext
|
||||
|
||||
▸ **getServiceContext**(): [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseRetriever](../interfaces/BaseRetriever.md).[getServiceContext](../interfaces/BaseRetriever.md#getservicecontext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorIndexRetriever.ts:69](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L69)
|
||||
|
||||
___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`query`, `parentEvent?`): `Promise`<[`NodeWithScore`](../interfaces/NodeWithScore.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `parentEvent?` | [`Event`](../interfaces/Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`NodeWithScore`](../interfaces/NodeWithScore.md)[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[BaseRetriever](../interfaces/BaseRetriever.md).[retrieve](../interfaces/BaseRetriever.md#retrieve)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorIndexRetriever.ts:35](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorIndexRetriever.ts#L35)
|
||||
@@ -1,347 +0,0 @@
|
||||
---
|
||||
id: "VectorStoreIndex"
|
||||
title: "Class: VectorStoreIndex"
|
||||
sidebar_label: "VectorStoreIndex"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
The VectorStoreIndex, an index that stores the nodes only according to their vector embedings.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`BaseIndex`](BaseIndex.md)<[`IndexDict`](IndexDict.md)\>
|
||||
|
||||
↳ **`VectorStoreIndex`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• `Private` **new VectorStoreIndex**(`init`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `init` | `VectorIndexConstructorProps` |
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[constructor](BaseIndex.md#constructor)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorStoreIndex.ts:41](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L41)
|
||||
|
||||
## Properties
|
||||
|
||||
### docStore
|
||||
|
||||
• **docStore**: `BaseDocumentStore`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[docStore](BaseIndex.md#docstore)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:125](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L125)
|
||||
|
||||
___
|
||||
|
||||
### indexStore
|
||||
|
||||
• `Optional` **indexStore**: `BaseIndexStore`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[indexStore](BaseIndex.md#indexstore)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:127](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L127)
|
||||
|
||||
___
|
||||
|
||||
### indexStruct
|
||||
|
||||
• **indexStruct**: [`IndexDict`](IndexDict.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[indexStruct](BaseIndex.md#indexstruct)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:128](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L128)
|
||||
|
||||
___
|
||||
|
||||
### serviceContext
|
||||
|
||||
• **serviceContext**: [`ServiceContext`](../interfaces/ServiceContext.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[serviceContext](BaseIndex.md#servicecontext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:123](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L123)
|
||||
|
||||
___
|
||||
|
||||
### storageContext
|
||||
|
||||
• **storageContext**: [`StorageContext`](../interfaces/StorageContext.md)
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[storageContext](BaseIndex.md#storagecontext)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L124)
|
||||
|
||||
___
|
||||
|
||||
### vectorStore
|
||||
|
||||
• **vectorStore**: [`VectorStore`](../interfaces/VectorStore.md)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[vectorStore](BaseIndex.md#vectorstore)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorStoreIndex.ts:39](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L39)
|
||||
|
||||
## Methods
|
||||
|
||||
### asQueryEngine
|
||||
|
||||
▸ **asQueryEngine**(`options?`): [`BaseQueryEngine`](../interfaces/BaseQueryEngine.md)
|
||||
|
||||
Create a new query engine from the index. It will also create a retriever
|
||||
and response synthezier if they are not provided.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `options?` | `Object` | you can supply your own custom Retriever and ResponseSynthesizer |
|
||||
| `options.responseSynthesizer?` | [`ResponseSynthesizer`](ResponseSynthesizer.md) | - |
|
||||
| `options.retriever?` | [`BaseRetriever`](../interfaces/BaseRetriever.md) | - |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`BaseQueryEngine`](../interfaces/BaseQueryEngine.md)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[asQueryEngine](BaseIndex.md#asqueryengine)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorStoreIndex.ts:226](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L226)
|
||||
|
||||
___
|
||||
|
||||
### asRetriever
|
||||
|
||||
▸ **asRetriever**(`options?`): [`VectorIndexRetriever`](VectorIndexRetriever.md)
|
||||
|
||||
Create a new retriever from the index.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `options?` | `any` |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`VectorIndexRetriever`](VectorIndexRetriever.md)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[asRetriever](BaseIndex.md#asretriever)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorStoreIndex.ts:222](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L222)
|
||||
|
||||
___
|
||||
|
||||
### deleteRefDoc
|
||||
|
||||
▸ **deleteRefDoc**(`refDocId`, `deleteFromDocStore?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value |
|
||||
| :------ | :------ | :------ |
|
||||
| `refDocId` | `string` | `undefined` |
|
||||
| `deleteFromDocStore` | `boolean` | `true` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[deleteRefDoc](BaseIndex.md#deleterefdoc)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorStoreIndex.ts:262](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L262)
|
||||
|
||||
___
|
||||
|
||||
### insert
|
||||
|
||||
▸ **insert**(`document`): `Promise`<`void`\>
|
||||
|
||||
Insert a document into the index.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `document` | [`Document`](Document.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseIndex](BaseIndex.md).[insert](BaseIndex.md#insert)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:159](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L159)
|
||||
|
||||
___
|
||||
|
||||
### insertNodes
|
||||
|
||||
▸ **insertNodes**(`nodes`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `nodes` | [`BaseNode`](BaseNode.md)[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`void`\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
[BaseIndex](BaseIndex.md).[insertNodes](BaseIndex.md#insertnodes)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorStoreIndex.ts:237](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L237)
|
||||
|
||||
___
|
||||
|
||||
### buildIndexFromNodes
|
||||
|
||||
▸ `Static` **buildIndexFromNodes**(`nodes`, `serviceContext`, `vectorStore`, `docStore`, `indexDict?`): `Promise`<[`IndexDict`](IndexDict.md)\>
|
||||
|
||||
Get embeddings for nodes and place them into the index.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `nodes` | [`BaseNode`](BaseNode.md)[] |
|
||||
| `serviceContext` | [`ServiceContext`](../interfaces/ServiceContext.md) |
|
||||
| `vectorStore` | [`VectorStore`](../interfaces/VectorStore.md) |
|
||||
| `docStore` | `BaseDocumentStore` |
|
||||
| `indexDict?` | [`IndexDict`](IndexDict.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`IndexDict`](IndexDict.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorStoreIndex.ts:153](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L153)
|
||||
|
||||
___
|
||||
|
||||
### fromDocuments
|
||||
|
||||
▸ `Static` **fromDocuments**(`documents`, `args?`): `Promise`<[`VectorStoreIndex`](VectorStoreIndex.md)\>
|
||||
|
||||
High level API: split documents, get embeddings, and build index.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `documents` | [`Document`](Document.md)[] |
|
||||
| `args` | `Object` |
|
||||
| `args.serviceContext?` | [`ServiceContext`](../interfaces/ServiceContext.md) |
|
||||
| `args.storageContext?` | [`StorageContext`](../interfaces/StorageContext.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`VectorStoreIndex`](VectorStoreIndex.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorStoreIndex.ts:197](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L197)
|
||||
|
||||
___
|
||||
|
||||
### getNodeEmbeddingResults
|
||||
|
||||
▸ `Static` **getNodeEmbeddingResults**(`nodes`, `serviceContext`, `logProgress?`): `Promise`<[`BaseNode`](BaseNode.md)[]\>
|
||||
|
||||
Get the embeddings for nodes.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| :------ | :------ | :------ | :------ |
|
||||
| `nodes` | [`BaseNode`](BaseNode.md)[] | `undefined` | |
|
||||
| `serviceContext` | [`ServiceContext`](../interfaces/ServiceContext.md) | `undefined` | |
|
||||
| `logProgress` | `boolean` | `false` | log progress to console (useful for debugging) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`BaseNode`](BaseNode.md)[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorStoreIndex.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L124)
|
||||
|
||||
___
|
||||
|
||||
### init
|
||||
|
||||
▸ `Static` **init**(`options`): `Promise`<[`VectorStoreIndex`](VectorStoreIndex.md)\>
|
||||
|
||||
The async init function should be called after the constructor.
|
||||
This is needed to handle persistence.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `options` | `VectorIndexOptions` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`VectorStoreIndex`](VectorStoreIndex.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/vectorStore/VectorStoreIndex.ts:52](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/vectorStore/VectorStoreIndex.ts#L52)
|
||||
@@ -1,2 +0,0 @@
|
||||
label: "Classes"
|
||||
position: 3
|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
id: "DeuceChatStrategy"
|
||||
title: "Enumeration: DeuceChatStrategy"
|
||||
sidebar_label: "DeuceChatStrategy"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### A16Z
|
||||
|
||||
• **A16Z** = ``"a16z"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:246](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L246)
|
||||
|
||||
___
|
||||
|
||||
### META
|
||||
|
||||
• **META** = ``"meta"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:247](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L247)
|
||||
|
||||
___
|
||||
|
||||
### METAWBOS
|
||||
|
||||
• **METAWBOS** = ``"metawbos"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:248](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L248)
|
||||
|
||||
___
|
||||
|
||||
### REPLICATE4BIT
|
||||
|
||||
• **REPLICATE4BIT** = ``"replicate4bit"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:251](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L251)
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
id: "IndexStructType"
|
||||
title: "Enumeration: IndexStructType"
|
||||
sidebar_label: "IndexStructType"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### LIST
|
||||
|
||||
• **LIST** = ``"list"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:41](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
### SIMPLE\_DICT
|
||||
|
||||
• **SIMPLE\_DICT** = ``"simple_dict"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:40](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L40)
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
id: "ListRetrieverMode"
|
||||
title: "Enumeration: ListRetrieverMode"
|
||||
sidebar_label: "ListRetrieverMode"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### DEFAULT
|
||||
|
||||
• **DEFAULT** = ``"default"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L30)
|
||||
|
||||
___
|
||||
|
||||
### LLM
|
||||
|
||||
• **LLM** = ``"llm"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/list/ListIndex.ts:32](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/list/ListIndex.ts#L32)
|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
id: "MetadataMode"
|
||||
title: "Enumeration: MetadataMode"
|
||||
sidebar_label: "MetadataMode"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### ALL
|
||||
|
||||
• **ALL** = ``"ALL"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:20](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
### EMBED
|
||||
|
||||
• **EMBED** = ``"EMBED"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:21](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
### LLM
|
||||
|
||||
• **LLM** = ``"LLM"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:22](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L22)
|
||||
|
||||
___
|
||||
|
||||
### NONE
|
||||
|
||||
• **NONE** = ``"NONE"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:23](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L23)
|
||||
@@ -1,57 +0,0 @@
|
||||
---
|
||||
id: "NodeRelationship"
|
||||
title: "Enumeration: NodeRelationship"
|
||||
sidebar_label: "NodeRelationship"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### CHILD
|
||||
|
||||
• **CHILD** = ``"CHILD"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:9](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
### NEXT
|
||||
|
||||
• **NEXT** = ``"NEXT"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
### PARENT
|
||||
|
||||
• **PARENT** = ``"PARENT"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:8](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L8)
|
||||
|
||||
___
|
||||
|
||||
### PREVIOUS
|
||||
|
||||
• **PREVIOUS** = ``"PREVIOUS"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:6](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L6)
|
||||
|
||||
___
|
||||
|
||||
### SOURCE
|
||||
|
||||
• **SOURCE** = ``"SOURCE"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:5](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L5)
|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
id: "ObjectType"
|
||||
title: "Enumeration: ObjectType"
|
||||
sidebar_label: "ObjectType"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### DOCUMENT
|
||||
|
||||
• **DOCUMENT** = ``"DOCUMENT"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### IMAGE
|
||||
|
||||
• **IMAGE** = ``"IMAGE"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### INDEX
|
||||
|
||||
• **INDEX** = ``"INDEX"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### TEXT
|
||||
|
||||
• **TEXT** = ``"TEXT"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Node.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L13)
|
||||
@@ -1,40 +0,0 @@
|
||||
---
|
||||
id: "SimilarityType"
|
||||
title: "Enumeration: SimilarityType"
|
||||
sidebar_label: "SimilarityType"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Similarity type
|
||||
Default is cosine similarity. Dot product and negative Euclidean distance are also supported.
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### DEFAULT
|
||||
|
||||
• **DEFAULT** = ``"cosine"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### DOT\_PRODUCT
|
||||
|
||||
• **DOT\_PRODUCT** = ``"dot_product"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:18](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
### EUCLIDEAN
|
||||
|
||||
• **EUCLIDEAN** = ``"euclidean"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Embedding.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L19)
|
||||
@@ -1,77 +0,0 @@
|
||||
---
|
||||
id: "VectorStoreQueryMode"
|
||||
title: "Enumeration: VectorStoreQueryMode"
|
||||
sidebar_label: "VectorStoreQueryMode"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### DEFAULT
|
||||
|
||||
• **DEFAULT** = ``"default"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/types.ts:11](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
### HYBRID
|
||||
|
||||
• **HYBRID** = ``"hybrid"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/types.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L13)
|
||||
|
||||
___
|
||||
|
||||
### LINEAR\_REGRESSION
|
||||
|
||||
• **LINEAR\_REGRESSION** = ``"linear_regression"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/types.ts:17](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### LOGISTIC\_REGRESSION
|
||||
|
||||
• **LOGISTIC\_REGRESSION** = ``"logistic_regression"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/types.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### MMR
|
||||
|
||||
• **MMR** = ``"mmr"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/types.ts:19](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
### SPARSE
|
||||
|
||||
• **SPARSE** = ``"sparse"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/types.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
### SVM
|
||||
|
||||
• **SVM** = ``"svm"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/types.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L15)
|
||||
@@ -1,2 +0,0 @@
|
||||
label: "Enumerations"
|
||||
position: 2
|
||||
@@ -1,107 +0,0 @@
|
||||
---
|
||||
id: "index"
|
||||
title: "llamaindex"
|
||||
sidebar_label: "Readme"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
# LlamaIndex.TS
|
||||
|
||||
LlamaIndex is a data framework for your LLM application.
|
||||
|
||||
Use your own data with large language models (LLMs, OpenAI ChatGPT and others) in Typescript and Javascript.
|
||||
|
||||
Documentation: https://ts.llamaindex.ai/
|
||||
|
||||
## What is LlamaIndex.TS?
|
||||
|
||||
LlamaIndex.TS aims to be a lightweight, easy to use set of libraries to help you integrate large language models into your applications with your own data.
|
||||
|
||||
## Getting started with an example:
|
||||
|
||||
LlamaIndex.TS requries Node v18 or higher. You can download it from https://nodejs.org or use https://nvm.sh (our preferred option).
|
||||
|
||||
In a new folder:
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY="sk-......" # Replace with your key from https://platform.openai.com/account/api-keys
|
||||
pnpm init
|
||||
pnpm install typescript
|
||||
pnpm exec tsc –-init # if needed
|
||||
pnpm install llamaindex
|
||||
pnpm install @types/node
|
||||
```
|
||||
|
||||
Create the file example.ts
|
||||
|
||||
```ts
|
||||
// example.ts
|
||||
import fs from "fs/promises";
|
||||
import { Document, VectorStoreIndex } from "llamaindex";
|
||||
|
||||
async function main() {
|
||||
// Load essay from abramov.txt in Node
|
||||
const essay = await fs.readFile(
|
||||
"node_modules/llamaindex/examples/abramov.txt",
|
||||
"utf-8"
|
||||
);
|
||||
|
||||
// Create Document object with essay
|
||||
const document = new Document({ text: essay });
|
||||
|
||||
// Split text and create embeddings. Store them in a VectorStoreIndex
|
||||
const index = await VectorStoreIndex.fromDocuments([document]);
|
||||
|
||||
// Query the index
|
||||
const queryEngine = index.asQueryEngine();
|
||||
const response = await queryEngine.query(
|
||||
"What did the author do in college?"
|
||||
);
|
||||
|
||||
// Output response
|
||||
console.log(response.toString());
|
||||
}
|
||||
|
||||
main();
|
||||
```
|
||||
|
||||
Then you can run it using
|
||||
|
||||
```bash
|
||||
pnpm dlx ts-node example.ts
|
||||
```
|
||||
|
||||
## Playground
|
||||
|
||||
Check out our NextJS playground at https://llama-playground.vercel.app/. The source is available at https://github.com/run-llama/ts-playground
|
||||
|
||||
## Core concepts for getting started:
|
||||
|
||||
- [Document](/packages/core/src/Node.ts): A document represents a text file, PDF file or other contiguous piece of data.
|
||||
|
||||
- [Node](/packages/core/src/Node.ts): The basic data building block. Most commonly, these are parts of the document split into manageable pieces that are small enough to be fed into an embedding model and LLM.
|
||||
|
||||
- [Embedding](/packages/core/src/Embedding.ts): Embeddings are sets of floating point numbers which represent the data in a Node. By comparing the similarity of embeddings, we can derive an understanding of the similarity of two pieces of data. One use case is to compare the embedding of a question with the embeddings of our Nodes to see which Nodes may contain the data needed to answer that quesiton.
|
||||
|
||||
- [Indices](/packages/core/src/indices/): Indices store the Nodes and the embeddings of those nodes. QueryEngines retrieve Nodes from these Indices using embedding similarity.
|
||||
|
||||
- [QueryEngine](/packages/core/src/QueryEngine.ts): Query engines are what generate the query you put in and give you back the result. Query engines generally combine a pre-built prompt with selected Nodes from your Index to give the LLM the context it needs to answer your query.
|
||||
|
||||
- [ChatEngine](/packages/core/src/ChatEngine.ts): A ChatEngine helps you build a chatbot that will interact with your Indices.
|
||||
|
||||
- [SimplePrompt](/packages/core/src/Prompt.ts): A simple standardized function call definition that takes in inputs and formats them in a template literal. SimplePrompts can be specialized using currying and combined using other SimplePrompt functions.
|
||||
|
||||
## Supported LLMs:
|
||||
|
||||
- OpenAI GPT-3.5-turbo and GPT-4
|
||||
- Anthropic Claude Instant and Claude 2
|
||||
- Llama2 Chat LLMs (70B, 13B, and 7B parameters)
|
||||
|
||||
## Contributing:
|
||||
|
||||
We are in the very early days of LlamaIndex.TS. If you’re interested in hacking on it with us check out our [contributing guide](/CONTRIBUTING.md)
|
||||
|
||||
## Bugs? Questions?
|
||||
|
||||
Please join our Discord! https://discord.com/invite/eN6D2HQ4aX
|
||||
@@ -1,73 +0,0 @@
|
||||
---
|
||||
id: "BaseIndexInit"
|
||||
title: "Interface: BaseIndexInit<T>"
|
||||
sidebar_label: "BaseIndexInit"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
## Properties
|
||||
|
||||
### docStore
|
||||
|
||||
• **docStore**: `BaseDocumentStore`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:112](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L112)
|
||||
|
||||
___
|
||||
|
||||
### indexStore
|
||||
|
||||
• `Optional` **indexStore**: `BaseIndexStore`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:114](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L114)
|
||||
|
||||
___
|
||||
|
||||
### indexStruct
|
||||
|
||||
• **indexStruct**: `T`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:115](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L115)
|
||||
|
||||
___
|
||||
|
||||
### serviceContext
|
||||
|
||||
• **serviceContext**: [`ServiceContext`](ServiceContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:110](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L110)
|
||||
|
||||
___
|
||||
|
||||
### storageContext
|
||||
|
||||
• **storageContext**: [`StorageContext`](StorageContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:111](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L111)
|
||||
|
||||
___
|
||||
|
||||
### vectorStore
|
||||
|
||||
• `Optional` **vectorStore**: [`VectorStore`](VectorStore.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[indices/BaseIndex.ts:113](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L113)
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
id: "BaseOutputParser"
|
||||
title: "Interface: BaseOutputParser<T>"
|
||||
sidebar_label: "BaseOutputParser"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
An OutputParser is used to extract structured data from the raw output of the LLM.
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`SubQuestionOutputParser`](../classes/SubQuestionOutputParser.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### format
|
||||
|
||||
▸ **format**(`output`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `output` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[OutputParser.ts:8](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/OutputParser.ts#L8)
|
||||
|
||||
___
|
||||
|
||||
### parse
|
||||
|
||||
▸ **parse**(`output`): `T`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `output` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`T`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[OutputParser.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/OutputParser.ts#L7)
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
id: "BaseQueryEngine"
|
||||
title: "Interface: BaseQueryEngine"
|
||||
sidebar_label: "BaseQueryEngine"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A query engine is a question answerer that can use one or more steps.
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`RetrieverQueryEngine`](../classes/RetrieverQueryEngine.md)
|
||||
- [`SubQuestionQueryEngine`](../classes/SubQuestionQueryEngine.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### query
|
||||
|
||||
▸ **query**(`query`, `parentEvent?`): `Promise`<[`Response`](../classes/Response.md)\>
|
||||
|
||||
Query the query engine and get a response.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `parentEvent?` | [`Event`](Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Response`](../classes/Response.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QueryEngine.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QueryEngine.ts#L24)
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
id: "BaseQuestionGenerator"
|
||||
title: "Interface: BaseQuestionGenerator"
|
||||
sidebar_label: "BaseQuestionGenerator"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
QuestionGenerators generate new questions for the LLM using tools and a user query.
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`LLMQuestionGenerator`](../classes/LLMQuestionGenerator.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### generate
|
||||
|
||||
▸ **generate**(`tools`, `query`): `Promise`<[`SubQuestion`](SubQuestion.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `tools` | [`ToolMetadata`](ToolMetadata.md)[] |
|
||||
| `query` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`SubQuestion`](SubQuestion.md)[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[QuestionGenerator.ts:23](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/QuestionGenerator.ts#L23)
|
||||
@@ -1,36 +0,0 @@
|
||||
---
|
||||
id: "BaseReader"
|
||||
title: "Interface: BaseReader"
|
||||
sidebar_label: "BaseReader"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A reader takes imports data into Document objects.
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`PDFReader`](../classes/PDFReader.md)
|
||||
- [`PapaCSVReader`](../classes/PapaCSVReader.md)
|
||||
- [`SimpleDirectoryReader`](../classes/SimpleDirectoryReader.md)
|
||||
- [`TextFileReader`](../classes/TextFileReader.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### loadData
|
||||
|
||||
▸ **loadData**(`...args`): `Promise`<[`Document`](../classes/Document.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `any`[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Document`](../classes/Document.md)[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[readers/base.ts:7](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/readers/base.ts#L7)
|
||||
@@ -1,50 +0,0 @@
|
||||
---
|
||||
id: "BaseRetriever"
|
||||
title: "Interface: BaseRetriever"
|
||||
sidebar_label: "BaseRetriever"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Retrievers retrieve the nodes that most closely match our query in similarity.
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`ListIndexLLMRetriever`](../classes/ListIndexLLMRetriever.md)
|
||||
- [`ListIndexRetriever`](../classes/ListIndexRetriever.md)
|
||||
- [`VectorIndexRetriever`](../classes/VectorIndexRetriever.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### getServiceContext
|
||||
|
||||
▸ **getServiceContext**(): [`ServiceContext`](ServiceContext.md)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ServiceContext`](ServiceContext.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Retriever.ts:10](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Retriever.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`query`, `parentEvent?`): `Promise`<[`NodeWithScore`](NodeWithScore.md)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `query` | `string` |
|
||||
| `parentEvent?` | [`Event`](Event.md) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`NodeWithScore`](NodeWithScore.md)[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Retriever.ts:9](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Retriever.ts#L9)
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
id: "BaseTool"
|
||||
title: "Interface: BaseTool"
|
||||
sidebar_label: "BaseTool"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Simple Tool interface. Likely to change.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`BaseTool`**
|
||||
|
||||
↳ [`QueryEngineTool`](QueryEngineTool.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### metadata
|
||||
|
||||
• **metadata**: [`ToolMetadata`](ToolMetadata.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[Tool.ts:12](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Tool.ts#L12)
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
id: "ChatEngine"
|
||||
title: "Interface: ChatEngine"
|
||||
sidebar_label: "ChatEngine"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A ChatEngine is used to handle back and forth chats between the application and the LLM.
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`CondenseQuestionChatEngine`](../classes/CondenseQuestionChatEngine.md)
|
||||
- [`ContextChatEngine`](../classes/ContextChatEngine.md)
|
||||
- [`SimpleChatEngine`](../classes/SimpleChatEngine.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### chat
|
||||
|
||||
▸ **chat**(`message`, `chatHistory?`): `Promise`<[`Response`](../classes/Response.md)\>
|
||||
|
||||
Send message along with the class's current chat history to the LLM.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `message` | `string` | |
|
||||
| `chatHistory?` | [`ChatMessage`](ChatMessage.md)[] | optional chat history if you want to customize the chat history |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Response`](../classes/Response.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
### reset
|
||||
|
||||
▸ **reset**(): `void`
|
||||
|
||||
Resets the chat history so that it's empty.
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[ChatEngine.ts:30](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/ChatEngine.ts#L30)
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
id: "ChatMessage"
|
||||
title: "Interface: ChatMessage"
|
||||
sidebar_label: "ChatMessage"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### content
|
||||
|
||||
• **content**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:28](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L28)
|
||||
|
||||
___
|
||||
|
||||
### role
|
||||
|
||||
• **role**: [`MessageType`](../modules.md#messagetype)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:29](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L29)
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
id: "ChatResponse"
|
||||
title: "Interface: ChatResponse"
|
||||
sidebar_label: "ChatResponse"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### delta
|
||||
|
||||
• `Optional` **delta**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:35](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### message
|
||||
|
||||
• **message**: [`ChatMessage`](ChatMessage.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:33](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### raw
|
||||
|
||||
• `Optional` **raw**: `Record`<`string`, `any`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[llm/LLM.ts:34](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L34)
|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
id: "Event"
|
||||
title: "Interface: Event"
|
||||
sidebar_label: "Event"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
• **id**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[callbacks/CallbackManager.ts:13](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L13)
|
||||
|
||||
___
|
||||
|
||||
### parentId
|
||||
|
||||
• `Optional` **parentId**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[callbacks/CallbackManager.ts:16](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### tags
|
||||
|
||||
• `Optional` **tags**: [`EventTag`](../modules.md#eventtag)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[callbacks/CallbackManager.ts:15](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`EventType`](../modules.md#eventtype)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[callbacks/CallbackManager.ts:14](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/callbacks/CallbackManager.ts#L14)
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
id: "ExactMatchFilter"
|
||||
title: "Interface: ExactMatchFilter"
|
||||
sidebar_label: "ExactMatchFilter"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### filterType
|
||||
|
||||
• **filterType**: ``"ExactMatch"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/types.ts:23](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
### key
|
||||
|
||||
• **key**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/types.ts:24](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L24)
|
||||
|
||||
___
|
||||
|
||||
### value
|
||||
|
||||
• **value**: `string` \| `number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[storage/vectorStore/types.ts:25](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/storage/vectorStore/types.ts#L25)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user