{"_id":"@altiplano/inferserver","_rev":"6-7abe01368200a43cf4c0f89c38c45585","name":"@altiplano/inferserver","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.1":{"name":"@altiplano/inferserver","version":"0.0.1","description":"Altiplano base inference server","license":"MIT","repository":{"type":"git","url":"https://github.com/synw/altiplano.git"},"keywords":["llm","ai"],"scripts":{"build":"tsc -p .","start":"run-s build servejs","serve":"tsc -w & nodemon -q -w src dist/bin/runserver.js","runserver":"node dist/bin/runserver.js"},"dependencies":{"@altiplano/usellama":"^0.0.1","@koa/cors":"^4.0.0","koa":"^2.14.1","koa-body":"^6.0.1","koa-router":"^12.0.0","koa-static":"^5.0.0","llama-node":"0.1.6","ws":"^8.13.0"},"devDependencies":{"@altiplano/types":"^0.0.1","@types/koa":"^2.13.6","@types/koa-router":"^7.4.4","@types/koa-static":"^4.0.2","@types/node":"^18.15.11","autoprefixer":"^10.4.4","nodemon":"^2.0.22","npm-run-all":"^4.1.5","path":"^0.12.7","ts-node":"^10.9.1","ts-node-esm":"^0.0.6","tslib":"^2.5.0","typescript":"^4.9.5"},"main":"dist/index.js","type":"module","bin":{"inferserver":"dist/bin/runserver.js"},"preferGlobal":true,"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"licenseText":"MIT License\n\nCopyright (c) 2022 synw\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@altiplano/inferserver@0.0.1","dist":{"shasum":"1bc25c5400982dbd2f2d3d26f90a5001711e9ca2","integrity":"sha512-FPzrlps6cHxbXdEkpbwfsHG4Z7f7blEvyFqoQEWaDuBlt4asfSh2LxDcItZQF4aaCF5lQhshtd426o+IoTa/Xw==","tarball":"https://registry.npmjs.org/@altiplano/inferserver/-/inferserver-0.0.1.tgz","fileCount":29,"unpackedSize":25242,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCi98/jZwVQ2sNgxEclm3ystOTniDigJJvtj2A9OJyjuwIgbuiqlhB+8JFCeJMzvQccp2N9NASy0SEeTQWKmAZIaF0="}]},"_npmUser":{"name":"synw","email":"synwx@pm.me"},"directories":{},"maintainers":[{"name":"synw","email":"synwx@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inferserver_0.0.1_1687524645722_0.08164660421266423"},"_hasShrinkwrap":false},"0.0.2":{"name":"@altiplano/inferserver","version":"0.0.2","description":"Altiplano base inference server","license":"MIT","repository":{"type":"git","url":"https://github.com/synw/altiplano.git"},"keywords":["llm","ai"],"scripts":{"build":"tsc -p .","start":"run-s build servejs","serve":"tsc -w & nodemon -q -w src dist/bin/runserver.js","runserver":"node dist/bin/runserver.js"},"dependencies":{"@altiplano/usellama":"^0.0.2","@koa/cors":"^4.0.0","koa":"^2.14.1","koa-body":"^6.0.1","koa-router":"^12.0.0","koa-static":"^5.0.0","llama-node":"0.1.6","ws":"^8.13.0"},"devDependencies":{"@altiplano/types":"^0.0.1","@types/koa":"^2.13.6","@types/koa-router":"^7.4.4","@types/koa-static":"^4.0.2","@types/node":"^18.15.11","autoprefixer":"^10.4.4","nodemon":"^2.0.22","npm-run-all":"^4.1.5","path":"^0.12.7","ts-node":"^10.9.1","ts-node-esm":"^0.0.6","tslib":"^2.5.0","typescript":"^4.9.5"},"main":"dist/index.js","type":"module","bin":{"inferserver":"dist/bin/runserver.js"},"preferGlobal":true,"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"licenseText":"MIT License\n\nCopyright (c) 2022 synw\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@altiplano/inferserver@0.0.2","dist":{"shasum":"1c6326b0cd03c7045531882ca704624f6b12ea67","integrity":"sha512-FuGzj+Yt7A2EsqbJzdiT37jyKEeoE5jU23eBkHYaUK1CUX/FqZKZ3VNY4AYn7tTi6H4+BlPYXiU4yzyIZ3/eEw==","tarball":"https://registry.npmjs.org/@altiplano/inferserver/-/inferserver-0.0.2.tgz","fileCount":29,"unpackedSize":25242,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHP6nNHNcEjWbMxCUQCZgxNRWMVZJwt602g3sqZ6KechAiEA4bC2r4XrfDCvgeTfuayxsw94O7waxGJgeVGDlomSEfs="}]},"_npmUser":{"name":"synw","email":"synwx@pm.me"},"directories":{},"maintainers":[{"name":"synw","email":"synwx@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inferserver_0.0.2_1687527982476_0.9498501315905119"},"_hasShrinkwrap":false},"0.0.3":{"name":"@altiplano/inferserver","version":"0.0.3","description":"Altiplano base inference server","license":"MIT","repository":{"type":"git","url":"https://github.com/synw/altiplano.git"},"keywords":["llm","ai"],"scripts":{"build":"tsc -p .","start":"run-s build servejs","serve":"tsc -w & nodemon -q -w src dist/bin/runserver.js","runserver":"node dist/bin/runserver.js"},"dependencies":{"@altiplano/usellama":"^0.0.3","@koa/cors":"^4.0.0","koa":"^2.14.1","koa-body":"^6.0.1","koa-router":"^12.0.0","koa-static":"^5.0.0","llama-node":"0.1.6","ws":"^8.13.0"},"devDependencies":{"@altiplano/types":"^0.0.1","@types/koa":"^2.13.6","@types/koa-router":"^7.4.4","@types/koa-static":"^4.0.2","@types/node":"^18.15.11","autoprefixer":"^10.4.4","nodemon":"^2.0.22","npm-run-all":"^4.1.5","path":"^0.12.7","ts-node":"^10.9.1","ts-node-esm":"^0.0.6","tslib":"^2.5.0","typescript":"^4.9.5"},"main":"dist/index.js","type":"module","bin":{"inferserver":"dist/bin/runserver.js"},"preferGlobal":true,"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"licenseText":"MIT License\n\nCopyright (c) 2022 synw\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@altiplano/inferserver@0.0.3","dist":{"shasum":"520ea7a0d3b249ed79d4d6e0bae6cfdce6c4bb42","integrity":"sha512-Oei20KHKzIov6MKbccz+9KfCI17YnMVUsmlQlPWsG5+RE8vuOpZKqOuI2WoqyrBNv+nDNi54XrwO27A8cuP9Og==","tarball":"https://registry.npmjs.org/@altiplano/inferserver/-/inferserver-0.0.3.tgz","fileCount":29,"unpackedSize":25242,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBrevvX3MlKeB+hq2Dr0zXNVWys6DhjgqHkpcVe9GrgdAiA/bgN+iy0CgIZlQJ5MfvCj9/1XkbmzZ2w+G+9iCVSLsQ=="}]},"_npmUser":{"name":"synw","email":"synwx@pm.me"},"directories":{},"maintainers":[{"name":"synw","email":"synwx@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inferserver_0.0.3_1687531930237_0.7346161645758906"},"_hasShrinkwrap":false},"0.0.4":{"name":"@altiplano/inferserver","version":"0.0.4","description":"Altiplano base inference server","license":"MIT","repository":{"type":"git","url":"https://github.com/synw/altiplano.git"},"keywords":["llm","ai"],"scripts":{"build":"tsc -p .","start":"run-s build servejs","serve":"tsc -w & nodemon -q -w src dist/bin/runserver.js","runserver":"node dist/bin/runserver.js"},"dependencies":{"@altiplano/usellama":"^0.0.3","@koa/cors":"^4.0.0","koa":"^2.14.1","koa-body":"^6.0.1","koa-router":"^12.0.0","koa-static":"^5.0.0","llama-node":"0.1.6","ws":"^8.13.0"},"devDependencies":{"@altiplano/types":"^0.0.1","@types/koa":"^2.13.6","@types/koa-router":"^7.4.4","@types/koa-static":"^4.0.2","@types/node":"^18.15.11","autoprefixer":"^10.4.4","nodemon":"^2.0.22","npm-run-all":"^4.1.5","path":"^0.12.7","ts-node":"^10.9.1","ts-node-esm":"^0.0.6","tslib":"^2.5.0","typescript":"^4.9.5"},"main":"dist/index.js","type":"module","bin":{"inferserver":"dist/bin/runserver.js"},"preferGlobal":true,"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"licenseText":"MIT License\n\nCopyright (c) 2022 synw\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@altiplano/inferserver@0.0.4","dist":{"shasum":"607552b015670955e87c8525c1887da90caabbb5","integrity":"sha512-yXlfzfaIUMYIiIGcRzc1A7M5wBLxYH1Ma3bGtBfgf6/yNay20slLFspNqBPOaOZDEpCzKH2e9ekrP3mTeTFfYA==","tarball":"https://registry.npmjs.org/@altiplano/inferserver/-/inferserver-0.0.4.tgz","fileCount":38,"unpackedSize":28921,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGo6TuQAComp8hTab+GE+OhZx8G4x+0e7D+Zu6vTjeq+AiAOP3O89k7uPRbUte0NciTYWYYCXobLbS5X4wbM4iRQMw=="}]},"_npmUser":{"name":"synw","email":"synwx@pm.me"},"directories":{},"maintainers":[{"name":"synw","email":"synwx@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inferserver_0.0.4_1687535002657_0.9389461578918123"},"_hasShrinkwrap":false},"0.0.5":{"name":"@altiplano/inferserver","version":"0.0.5","description":"Altiplano base inference server","license":"MIT","repository":{"type":"git","url":"https://github.com/synw/altiplano.git"},"keywords":["llm","ai"],"scripts":{"build":"tsc -p .","start":"run-s build servejs","serve":"tsc -w & nodemon -q -w src dist/bin/runserver.js","runserver":"node dist/bin/runserver.js"},"dependencies":{"@altiplano/usellama":"^0.0.3","@koa/cors":"^4.0.0","koa":"^2.14.1","koa-body":"^6.0.1","koa-router":"^12.0.0","koa-static":"^5.0.0","llama-node":"0.1.6","ws":"^8.13.0"},"devDependencies":{"@altiplano/types":"^0.0.1","@types/koa":"^2.13.6","@types/koa-router":"^7.4.4","@types/koa-static":"^4.0.2","@types/node":"^18.15.11","autoprefixer":"^10.4.4","nodemon":"^2.0.22","npm-run-all":"^4.1.5","path":"^0.12.7","ts-node":"^10.9.1","ts-node-esm":"^0.0.6","tslib":"^2.5.0","typescript":"^4.9.5"},"main":"dist/index.js","type":"module","bin":{"inferserver":"dist/bin/runserver.js"},"preferGlobal":true,"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"licenseText":"MIT License\n\nCopyright (c) 2022 synw\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@altiplano/inferserver@0.0.5","dist":{"shasum":"693b731341e6e354637aed6bd38e63792cb29474","integrity":"sha512-Ho+shFpEjNNFimB4bW97k5TzmdRXt5aT0TdmSttYa0BEC2jGk/lXjHw4WQOOaan6B7ZUJyzA1hOKH7Jswysm9g==","tarball":"https://registry.npmjs.org/@altiplano/inferserver/-/inferserver-0.0.5.tgz","fileCount":38,"unpackedSize":28994,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGOMPiI/qDlHrnFIZNJWIfpqTB7FrOmVtx2L/AagFSNBAiB5YShk8wUGTmSDEMtUSUKD4+xVMOSyP2q9gDtDLzNdXw=="}]},"_npmUser":{"name":"synw","email":"synwx@pm.me"},"directories":{},"maintainers":[{"name":"synw","email":"synwx@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inferserver_0.0.5_1687535134626_0.4267738578267075"},"_hasShrinkwrap":false},"0.0.6":{"name":"@altiplano/inferserver","version":"0.0.6","description":"Altiplano base inference server","license":"MIT","repository":{"type":"git","url":"https://github.com/synw/altiplano.git"},"keywords":["llm","ai"],"scripts":{"build":"tsc -p .","start":"run-s build servejs","serve":"tsc -w & nodemon -q -w src dist/bin/runserver.js","runserver":"node dist/bin/runserver.js"},"dependencies":{"@altiplano/usellama":"^0.0.3","@koa/cors":"^4.0.0","koa":"^2.14.1","koa-body":"^6.0.1","koa-router":"^12.0.0","koa-static":"^5.0.0","llama-node":"0.1.6","ws":"^8.13.0"},"devDependencies":{"@altiplano/types":"^0.0.1","@types/koa":"^2.13.6","@types/koa-router":"^7.4.4","@types/koa-static":"^4.0.2","@types/node":"^18.15.11","autoprefixer":"^10.4.4","nodemon":"^2.0.22","npm-run-all":"^4.1.5","path":"^0.12.7","ts-node":"^10.9.1","ts-node-esm":"^0.0.6","tslib":"^2.5.0","typescript":"^4.9.5"},"main":"dist/index.js","type":"module","bin":{"inferserver":"dist/bin/runserver.js"},"preferGlobal":true,"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"licenseText":"MIT License\n\nCopyright (c) 2022 synw\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@altiplano/inferserver@0.0.6","dist":{"shasum":"dcf11581a2f226ef26cd5c699c2595b119d74485","integrity":"sha512-UzYIi7jalrObWAe+5VuniYw3ksmjpPWoNhq36VOh0S27oxQFq3dCBKrjrix8Xx3Ua90flbT1cbCWBPwwc3NY2w==","tarball":"https://registry.npmjs.org/@altiplano/inferserver/-/inferserver-0.0.6.tgz","fileCount":38,"unpackedSize":28995,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIJPmUuUqTcsgOnX0zINvaVuxzk52wV6n7vRnlQt/37gIgSWEr86pdgONslBxo8qMkjm7kKTCY5mcUg/B7TbxXFmM="}]},"_npmUser":{"name":"synw","email":"synwx@pm.me"},"directories":{},"maintainers":[{"name":"synw","email":"synwx@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inferserver_0.0.6_1687535398498_0.3801663082288096"},"_hasShrinkwrap":false},"0.0.7":{"name":"@altiplano/inferserver","version":"0.0.7","description":"Altiplano base inference server","license":"MIT","repository":{"type":"git","url":"https://github.com/synw/altiplano.git"},"keywords":["llm","ai"],"scripts":{"build":"tsc -p .","start":"run-s build servejs","serve":"tsc -w & nodemon -q -w src dist/bin/runserver.js","runserver":"node dist/bin/runserver.js"},"dependencies":{"@altiplano/usellama":"^0.0.3","@koa/cors":"^4.0.0","koa":"^2.14.1","koa-body":"^6.0.1","koa-router":"^12.0.0","koa-static":"^5.0.0","llama-node":"0.1.6","ws":"^8.13.0"},"devDependencies":{"@altiplano/types":"^0.0.1","@types/koa":"^2.13.6","@types/koa-router":"^7.4.4","@types/koa-static":"^4.0.2","@types/node":"^18.15.11","@types/ws":"^8.5.5","autoprefixer":"^10.4.4","nodemon":"^2.0.22","npm-run-all":"^4.1.5","path":"^0.12.7","ts-node":"^10.9.1","ts-node-esm":"^0.0.6","tslib":"^2.5.0","typescript":"^4.9.5"},"main":"dist/index.js","type":"module","bin":{"inferserver":"dist/bin/runserver.js"},"preferGlobal":true,"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"licenseText":"MIT License\n\nCopyright (c) 2022 synw\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@altiplano/inferserver@0.0.7","dist":{"shasum":"c9ce4aefe2660fcf9545db25f0eea4bccaeec6f7","integrity":"sha512-0QpJEXUopXX1gbU7UHVP/jE2XM+yzRGaxx1oVOwUHXHkudWj8wDbSeX6vDuNDdIrOyzdNPgk8QxNQ8E5I7yiZA==","tarball":"https://registry.npmjs.org/@altiplano/inferserver/-/inferserver-0.0.7.tgz","fileCount":42,"unpackedSize":29884,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID6/nC65+Xye/K7TT43NQBQeBEaZFBO+5tToLDQOisKoAiAgTBrkEV2LIfWE9kE/xAiT6pgIvDYt4V7P/0VEF5dDEA=="}]},"_npmUser":{"name":"synw","email":"synwx@pm.me"},"directories":{},"maintainers":[{"name":"synw","email":"synwx@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inferserver_0.0.7_1687604212233_0.55113006229611"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-23T12:50:45.614Z","0.0.1":"2023-06-23T12:50:45.965Z","modified":"2023-06-24T10:56:52.591Z","0.0.2":"2023-06-23T13:46:22.674Z","0.0.3":"2023-06-23T14:52:10.418Z","0.0.4":"2023-06-23T15:43:22.785Z","0.0.5":"2023-06-23T15:45:34.819Z","0.0.6":"2023-06-23T15:49:58.700Z","0.0.7":"2023-06-24T10:56:52.384Z"},"maintainers":[{"name":"synw","email":"synwx@pm.me"}],"description":"Altiplano base inference server","keywords":["llm","ai"],"repository":{"type":"git","url":"https://github.com/synw/altiplano.git"},"license":"MIT","readme":"# Altiplano inference server\n\nThe base inference server library. Powered by [Koa](https://github.com/koajs/koa)\n\n## Install:\n\n```bash\nyarn global @altiplano/inferserver\n# or \nnpm install @altiplano/inferserver\n```\n\n## Usage\n\nTo run a server:\n\n```js\nimport { useInferServer } from \"@altiplano/inferserver\";\n\nconst { app } = useInferServer({\n  enableWs: false,\n  modelsDirPath: \"/an/absolute/path/to/models/dir\",\n  loadModel: \"open-llama-7B-open-instruct.ggmlv3.q5_1.bin\",\n});\n// run the server\napp.listen(5143, () => {\n  console.log(\"Server running on port 5143\");\n});\n```\n\nOptions:\n\n- `modelsDirPath`: *string* **required**: the path to the models directory\n- `loadModel`: *string*: a model name to load at startup\n- `enableWs`: *boolean*: enable websockets (default *true*)\n- `router`: *Router*: a Koa router\n- `lm`: *ReturnType<typeof useLlama>*: an instance of the useLlama composable\n- `wsPort`: *number*: the websockets port (default *5142*)\n- `uiDir`: *string*: serve a directory with an *index.html*\n\nTo use a model instance with custom parameters:\n\n```js\nimport { useLlama } from \"@altiplano/usellama\";\nimport { useInferServer } from \"@altiplano/inferserver\";\n\nconst lm = useLlama({\n  temp: 0.8,\n  nTokPredict: 512,\n});\nconst { app } = useInferServer({\n  modelsDirPath: \"/an/absolute/path/to/models/dir\",\n  loadModel: \"open-llama-7B-open-instruct.ggmlv3.q5_1.bin\",\n  lm: lm,\n})\n```\n\n## Endpoints\n\n### Models\n\n- `/model/all` *GET*: a list of the available models\n- `/model/select` *POST*: load a model from it's name. Params: `name` *string*\n\nExample:\n\n```ts\nconst models = await api.get<Array<LMContract>>(\"/model/all\");\n// select a model\nawait api.post(\"/model/select\", {\"name\": \"open-llama-7B-open-instruct.ggmlv3.q5_1\"});\n```\n\nOnce a model is loaded you can run inference\n\n### Inference\n\nEnpoint to run inference:\n\n- `/model/infer` *GET*: run inference from a prompt and template. Params: \n  - `prompt` *string* **required**: the prompt text\n  - `template` *string*: the template to use (default *{prompt}*)\n  - `templateVars` *string*: the template variables to use\n\n\n#### Examples\n\nUsing curl:\n\n```bash\ncurl -X POST -H \"Content-Type: application/json\" -d \\\n  '{\"prompt\": \"List the planets in the solar system\", \\\n  \"template\": \"### Instruction: {prompt}\\n### Response:\"}' http://localhost:5143/infer\n```\n\nUsing Typescript:\n\n```ts\nimport { InferResponseContract } from \"@altiplano/inferserver\";\n\nconst inferenceResult = await api.post<InferResponseContract>(\"/api/infer\", {\n    \"prompt\": \"List the planets in the solar system\",\n    \"template\": \"### Instruction: {prompt}\\n### Response:\"\n  });\n```\n\nTo abort a running inference:\n\n```ts\nawait api.get(\"/api/abort\");\n```\n\n## Websockets\n\nBy default the websockets are enabled. To connect to the inference response flow:\n\n```ts\nconst ws = new WebSocket('ws://localhost:5142');\nws.onmessage = (event) => {\n  const msg = event.data;\n  doSomething(msg)\n};\n```\n\n## Router options\n\nIt is possible to add extra routes to the default router or use a custom router.\n\n### Extra routes\n\nAdd your extra routes:\n\n```ts\nimport { useInferServer, useLmRouter, onServerReady } from \"@altiplano/inferserver\";\n\nconst routes = new Array([\n  (router) => {\n      router.get('/myroute', async (ctx) => {\n      await onServerReady;\n      // do something\n      ctx.status = 204;\n    });\n  }\n]);\nconst router = useLmRouter(routes);\nconst { app } = useInferServer({\n  modelsDirPath: \"/an/absolute/path/to/models/dir\",\n  router: router,\n});\n```\n\n### Disable models api\n\nTo use only one model and disable the switch models api:\n\n```ts\nconst router = useLmRouter({\n  useModelsRoutes: false\n});\nconst { app } = useInferServer({\n  modelsDirPath: \"/an/absolute/path/to/models/dir\",\n  router: router,\n});\n```\n\n## Command\n\nA basic runserver command is available:\n\n```bash\ninferserver /an/absolute/path/to/models/dir open-llama-7B-open-instruct.ggmlv3.q5_1.bin\n```\n\n## Example\n\n```ts\n#!/usr/bin/env node\n\nimport { argv, exit } from \"process\";\nimport { useInferServer } from \"@altiplano/inferserver\";\n\n/**\n * A function to start the server with a specified model or all models in the directory.\n * @param modelsDirPath - Path of the directory containing the Models.\n * @param modelName - Optional name of the model to use\n */\nfunction _runserver(modelsDirPath: string, loadModel?: string) {\n  const { app } = useInferServer({\n    enableWs: false,\n    modelsDirPath: modelsDirPath,\n    loadModel: loadModel,\n  });\n  app.listen(5143, () => {\n    console.log(\"Server running on port 5143\");\n  });\n}\n\nasync function main() {\n  let modelsDir = \"\";\n  let modelName: string | undefined = undefined;\n  if (argv.length > 2) {\n    let i = 0;\n    for (const arg of argv.slice(2, argv.length)) {\n      if (i == 0) {\n        modelsDir = arg;\n      } else {\n        modelName = arg;\n      }\n      ++i\n    }\n  }\n  _runserver(modelsDir, modelName);\n}\n\n(async () => {\n  try {\n    if (argv.length < 3) {\n      console.warn(\"Provide a models directory path as argument\")\n      exit(1)\n    }\n    await main();\n  } catch (e) {\n    throw e\n  }\n})();\n```\n","readmeFilename":"README.md"}