{"_id":"asyncllm","_rev":"17-1f8e662d5b1991a61af31864b8453484","name":"asyncllm","dist-tags":{"latest":"2.4.0"},"versions":{"1.0.0":{"name":"asyncllm","version":"1.0.0","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@1.0.0","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"44d4fc5998bc875fe88510bb4a1384fb934a125a","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-1.0.0.tgz","fileCount":5,"integrity":"sha512-qJM/mP1n/NdiGTlFFf1IzPmcvBH98ZRYEM8mBxvgP/4TT9qwvJwTGPWGKSaH/uMXdcb1rLcUC81tFiFweHAUpQ==","signatures":[{"sig":"MEUCIQDiVEv41MpIwwsF80XswkuKYG5Fg9gDv69/ImhBRgvbzgIgKeMOHas8H2VJc0WanTMKHF0m+b6AoU54J0tVbfW6EZc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11920},"main":"dist/asyncllm.js","type":"module","module":"index.js","engines":{"node":">=14.0.0"},"scripts":{"test":"deno test --allow-net --allow-read","build":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.8.3","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"22.9.0","dependencies":{"asyncsse":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_1.0.0_1729007369108_0.48398844070774194","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"asyncllm","version":"1.1.0","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@1.1.0","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"11c3f30cb01e3ec62a21f09777bced615520b5e3","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-1.1.0.tgz","fileCount":7,"integrity":"sha512-o0pKBit65fBHhAU1NyeX+4cvqV7Jo6Qrufwe9AibgiSO6kduNTxc2/LVaeMRvBgbI9GmSiIfGftcnGrQ7XasGw==","signatures":[{"sig":"MEMCH0Oi9ObT8vgtCT6QvTxemETkK1V1mvwgSdZXoNMHjq0CIH8oka4mhMkjiPgkYMkVjuScfXTQyaz23h7L3efe/Zq8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16786},"main":"dist/asyncllm.js","type":"module","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js"},"gitHead":"75d768f12dfc4835f874b06365f73049e5fb93bf","scripts":{"test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.8.3","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"22.9.0","dependencies":{"asyncsse":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_1.1.0_1730284822354_0.6355701404561405","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"asyncllm","version":"1.1.1","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@1.1.1","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"ce0235dc6ed4d1eab513c8f2d03b1f0519dd5d7c","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-1.1.1.tgz","fileCount":8,"integrity":"sha512-ZYnprZfyqNoUSsnXremB1eOSh0dGL5bh0BoKaPIVz5pTE/wbD+cbqe+xeexe7KHsdBz8LvDkNjBt32f2dQaZsQ==","signatures":[{"sig":"MEUCIQDPRGWce4sorUhvc4wgWhpmhjXgOCOVYCRVdhbGPCUuLAIgGVtWzgg8up0no2nJP/rwmF/2MSfckbDXkafZDWwNl1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20054},"main":"dist/asyncllm.js","type":"module","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"268e6e3ad66fab32c190b93140e107d3bcf28bfa","scripts":{"test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.8.3","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"22.9.0","dependencies":{"asyncsse":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_1.1.1_1730293415993_0.1906047801181634","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"asyncllm","version":"1.1.2","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@1.1.2","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"79da08fbeefd7feb6254d1048e50691e2e318959","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-1.1.2.tgz","fileCount":8,"integrity":"sha512-auPBCojllzfoIdkiAZ+9M4dUzkRJaesr0PGnPVG5fLijVUsEbmZ3UiNyov21ntRehflredS7H3zQMCEb1sDfgA==","signatures":[{"sig":"MEQCIFiO4cXE+yg1YOrkEvsWWtQz5iaDkG39DE6AkHqbUYVsAiBeE2D5q21BvX5bWkhhxWomePKbpnkNGyNP3Zan9utPVg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20130},"main":"dist/asyncllm.js","type":"module","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"268e6e3ad66fab32c190b93140e107d3bcf28bfa","scripts":{"test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.0.0","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"20.5.0","dependencies":{"asyncsse":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_1.1.2_1730472209546_0.7933097160272151","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"asyncllm","version":"1.1.3","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@1.1.3","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"bad85aea1e24fb02babcd733aaea758014dc8f81","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-1.1.3.tgz","fileCount":8,"integrity":"sha512-a4SmP0yt+EQiKiwnXETbUkdT7U+yCqQBs3MjgKRehFmVyZQCVu5qEikllv9zU/i8kjFBeUrq8JAFAiEfZot4Pg==","signatures":[{"sig":"MEQCIFDrfNKdZscbueDzXrziz+H4pSVL/ao1s0bxPMDkAPkfAiA1w4Xr9Y5PbbQaVjvv5QeSd3J625d+K/ekB3PuJGsiYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20487},"main":"dist/asyncllm.js","type":"module","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"268e6e3ad66fab32c190b93140e107d3bcf28bfa","scripts":{"lint":"npx prettier@3.3 --write *.js *.md","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.8.3","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"22.9.0","dependencies":{"asyncsse":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_1.1.3_1730540343367_0.0675753090636717","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"asyncllm","version":"1.2.0","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@1.2.0","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"ff3f3ec2abdf77bbf144d234352b28a86ad79ea4","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-1.2.0.tgz","fileCount":8,"integrity":"sha512-IY8ch5DgWxh/+92b5NFIfATVfDV7yEZX1fHbtU70R7ld2iyh6GN3z7tldU4uBxjn6VJIjf3m1LQQ6vagZSUrIg==","signatures":[{"sig":"MEYCIQDD1oGGjr+5WXw9o4/g85u9ZBKOcvH5dQcLSKRjhW2kEQIhAMT5TdeZ+umwdap5fJAHfZvGZcsfpFa6ZNa0CF88GjTz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21368},"main":"dist/asyncllm.js","type":"module","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"735132f961e82702b6d3050839c1c3ba5dcf366a","scripts":{"lint":"npx prettier@3.3 --write *.js *.md","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.8.3","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"22.9.0","dependencies":{"asyncsse":"^1.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_1.2.0_1730545375825_0.9725974869269012","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"asyncllm","version":"1.2.1","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@1.2.1","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"62c9804e0bdf118293f99a7e7edbcc206c51dc67","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-1.2.1.tgz","fileCount":8,"integrity":"sha512-MRodv1KgIhwMhApkcgWYuPxmlIRieeUnkA5fUm9R5sdqXQQwEQcaaHDujM5nqQz0KhsGyQHfsBwhPpMGXaC/rQ==","signatures":[{"sig":"MEUCIQCL4TCq323TVoMtf0ekiu9yjbiDCtMGE1cLBsHiT2wvDAIgLyPWB8RCITXzkjVFwF+eQ5BA4uyfcXT5buRDZZDBjnM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23651},"main":"dist/asyncllm.js","type":"module","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"800f73c0cc4b56fb384671f743aed54ba7759923","scripts":{"lint":"npx prettier@3.3 --write *.js *.md","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.0.0","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"20.5.0","dependencies":{"asyncsse":"^1.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_1.2.1_1730603666795_0.9586187787724387","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"asyncllm","version":"1.2.2","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@1.2.2","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"64ea201e11f24c595baa36960e41d623a1dc6b68","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-1.2.2.tgz","fileCount":13,"integrity":"sha512-fggeglkhtx4Ky5fVDiAcNSAYIjRrxz1EXldaZToemH84GZf7c1sLu+fAx+Muo+tD6OEJXWlAA7/6kjDMayyPvQ==","signatures":[{"sig":"MEUCIGq2SR1JbAititLBFlXrLTfW9gy3/Neg8IJkyiSmvY0uAiEAhqfF82dLpFaWof35uq2v//N7222Jgr3ZAy5VOaqfq2g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50169},"main":"dist/asyncllm.js","type":"module","types":"./dist/asyncllm.d.ts","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"800f73c0cc4b56fb384671f743aed54ba7759923","scripts":{"lint":"npx prettier@3.3 --write *.js *.md","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.0.0","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"20.5.0","dependencies":{"asyncsse":"^1.3.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_1.2.2_1730614699339_0.3982753630856253","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"asyncllm","version":"2.0.0","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@2.0.0","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"1ed3097e5bc7b846f113a5150e4499a530d8849f","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-2.0.0.tgz","fileCount":8,"integrity":"sha512-3gynn1GB7azCZGUUE7bnjRJcShYNC+jJdMJehKeKxIVsCSu8AgdFTJcS+Ixh+oNURBGFU1ih2hrz2M5SKdb05w==","signatures":[{"sig":"MEUCIEMKgZQp+fhT1HP/esJApTecEzhRMsLfWiySu9j5q5IJAiEAwNkcCcmrwYDJ6OdqAaHo8O8HMUpbpe7tY3ilsChJLhU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21970},"main":"dist/asyncllm.js","type":"module","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"0323fa339ed4e3f15243db7a9410ba6dc7d45276","scripts":{"lint":"npx prettier@3.3 --write *.js *.md","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.8.3","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"22.9.0","dependencies":{"asyncsse":"^1.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_2.0.0_1730795884069_0.46876392306428527","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"asyncllm","version":"2.0.1","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@2.0.1","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"3268f74d8b2f16a73bb963305a2e37aa93915930","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-2.0.1.tgz","fileCount":8,"integrity":"sha512-jyBIVwOWAXn9MS8oQzo4SnMae/pP4bXQ5ns3tsENw266Ij3zUTwf5Z1ebH7d14bvsjEp0A8Da5qgbBMWQXPzeQ==","signatures":[{"sig":"MEYCIQCeQ+VLlIslzW3Sii64xT0VTxnT8/3VdIyON+aUq+J9DQIhAI7mwugw2VSn9WVlJJUMS3L4aWwqM7z0x1Yn9Y3kcEoi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24749},"main":"dist/asyncllm.js","type":"module","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"4753d21fb477998679366fee061c5cd82c1a7a40","scripts":{"lint":"npx prettier@3.3 --write *.js *.md","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.8.3","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"22.9.0","dependencies":{"asyncsse":"^1.3.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_2.0.1_1730796423121_0.44256055795549076","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"asyncllm","version":"2.1.0","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@2.1.0","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"55475a7107d509eaf5185c17a7ca2dfc364ebdf9","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-2.1.0.tgz","fileCount":13,"integrity":"sha512-ZD2NeVwsgPpNgdBY/njZj1rRf7rdAwz5QA2yORcn9SSL67oyowzWahpGFXpm/LaMGGNmJlEg8qLuK9UeUv2U8w==","signatures":[{"sig":"MEYCIQD7NvqsTGf8wk8H8WVNkqZhO4078xFk5nWba179xQzToAIhAMM3ZGc70rt+rtO50Wcc2n9nCKH7t8TYAyZkBhnlQkUO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51116},"main":"dist/asyncllm.js","type":"module","types":"./dist/asyncllm.d.ts","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"4753d21fb477998679366fee061c5cd82c1a7a40","scripts":{"lint":"npx prettier@3.3 --write *.js *.md","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.0.0","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"20.5.0","dependencies":{"asyncsse":"^1.3.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_2.1.0_1730938512294_0.31303812154483923","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"asyncllm","version":"2.1.1","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@2.1.1","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/gramener/asyncllm#readme","bugs":{"url":"https://github.com/gramener/asyncllm/issues"},"dist":{"shasum":"41679407bce9c5949bbb4e6f63447f83c08012c7","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-2.1.1.tgz","fileCount":13,"integrity":"sha512-F7ZUXX84lz50gE/eiDREW8IsRnRe79kJTPSiLzA79p0eS97YmiAlaSt/ES5QGyReHy+gq7oQa1royNCCrN1KZg==","signatures":[{"sig":"MEUCIQCJnpoPjxckNdo6Iu0kOwqLsomwYIhIg5ZQ1xcRxGx8bQIgRZ/KJL2FK4I2RxJ6bwxKXUs+heWxDJMcY+IWV5Kmlr8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53513},"main":"dist/asyncllm.js","type":"module","types":"./dist/asyncllm.d.ts","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"f5787eefd5b5b1b6e08d3ca25ec5b0a96ee19ba3","scripts":{"lint":"npx prettier@3.3 --write *.js *.md","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/gramener/asyncllm.git","type":"git"},"_npmVersion":"10.0.0","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"20.5.0","dependencies":{"asyncsse":"^1.3.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_2.1.1_1731127757410_0.8666032217087516","host":"s3://npm-registry-packages"}},"2.1.2":{"name":"asyncllm","version":"2.1.2","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@2.1.2","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/sanand0/asyncllm#readme","bugs":{"url":"https://github.com/sanand0/asyncllm/issues"},"dist":{"shasum":"eea8a8f50d055a4bd9f41c2e31111840588e8b47","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-2.1.2.tgz","fileCount":13,"integrity":"sha512-aBP8a756WU3M/joQf0pfS06U/s5xi/7xJ22EwTqVNGyURyOUsPutolNqp24KXuZTBoe45PvUf/qyGloVf8JRPQ==","signatures":[{"sig":"MEYCIQDAEae3jq0BCu2etc3KYu8oyKJcL3H910miQSK3AKdG/QIhAMKXmQjfdx56bXVPP81EWYYeDNP3+KVr2cEHPMgy3oIv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53532},"main":"dist/asyncllm.js","type":"module","types":"./dist/asyncllm.d.ts","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"deeee00038d35076e7b61328b9b5843ed4f12839","scripts":{"lint":"npx prettier@3.3 --write *.js *.md","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/sanand0/asyncllm.git","type":"git"},"_npmVersion":"10.0.0","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"22.11.0","dependencies":{"asyncsse":"^1.3.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_2.1.2_1735123468746_0.795079383933198","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"asyncllm","version":"2.2.0","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"S Anand","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@2.2.0","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/sanand0/asyncllm#readme","bugs":{"url":"https://github.com/sanand0/asyncllm/issues"},"dist":{"shasum":"4902a3880c5115c1fbd60a425e8c659bab3be0fd","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-2.2.0.tgz","fileCount":8,"integrity":"sha512-uojdO1mXREFVQXKZJ//j5ylER8JmOT3bMI1E18sYVUn4huZZV3ZHBFJB9L5m4Sju6V6T7oDNRYJyCJEmFKv8Bg==","signatures":[{"sig":"MEQCIARlsi+walxqd18aqdM4bc30wWXAXHuD/o2MewLB7kuhAiAZDXD0OWoaBbaqRBuOILkIqDmjVCde0moaGlu8oeFfnQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30138},"main":"dist/asyncllm.js","type":"module","module":"index.js","engines":{"node":">=14.0.0"},"exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"623cd3184d58c49cd8400f84f860e079d08ac70e","scripts":{"lint":"npx prettier@3.5 --write *.js *.md","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild index.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/sanand0/asyncllm.git","type":"git"},"_npmVersion":"10.9.2","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"23.10.0","dependencies":{"asyncsse":"^1.3.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_2.2.0_1745412970555_0.9102947280880818","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"asyncllm","version":"2.3.0","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"Anand S","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@2.3.0","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/sanand0/asyncllm#readme","bugs":{"url":"https://github.com/sanand0/asyncllm/issues"},"dist":{"shasum":"aa3bce3140d604b3a74a3896436416bc1ac2838a","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-2.3.0.tgz","fileCount":6,"integrity":"sha512-UQQHSBhmN0oELoGz6lp8ejuBJH3dhwL2fuIWgvueBhfsXqGFngbOh23zcZp13TKxL0FHACDKblR6HdMRBtsGOQ==","signatures":[{"sig":"MEQCIENd2Iz78LS/sMzWnvmc0Gq6UsThlRTcOEMT1MlNsXv0AiAZWodPAp2bKVkbI4It6+9vBtwOsAb/aF8L31QeCR8UOQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25842},"type":"module","module":"asyncllm.js","exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"6f21ce3e5aab8d828eb94e1b51ee072ee5077bce","scripts":{"lint":"npm run lint:oxlint && npm run lint:js-md && npm run lint:html","test":"deno test --allow-net --allow-read","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","lint:html":"npx -y js-beautify@1 '**/*.html' --type html --replace --indent-size 2 --max-preserve-newlines 1 --end-with-newline","lint:js-md":"npx -y prettier@3.5 --print-width 120 --write '**/*.js' '!**/*.min.js' '!dist/**' '**/*.md'","lint:oxlint":"npx -y oxlint --fix","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild asyncllm.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build && npm test","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/sanand0/asyncllm.git","type":"git"},"_npmVersion":"10.9.2","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"23.10.0","dependencies":{"asyncsse":"^1.3.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/asyncllm_2.3.0_1753884049038_0.09136720650418262","host":"s3://npm-registry-packages-npm-production"}},"2.3.1":{"name":"asyncllm","version":"2.3.1","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"author":{"name":"Anand S","email":"root.node@gmail.com"},"license":"MIT","_id":"asyncllm@2.3.1","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"homepage":"https://github.com/sanand0/asyncllm#readme","bugs":{"url":"https://github.com/sanand0/asyncllm/issues"},"dist":{"shasum":"cb13f3bda21d28a0b8eebee156e73a0dc2af59eb","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-2.3.1.tgz","fileCount":6,"integrity":"sha512-tywrvSlRj6Q9rQba5ROakIVSJw/KcG9TvrVUtqjA4EcbxQTarmnKl1D/84YJW69kkWKIqbmB1wSSb2qK8oBYyw==","signatures":[{"sig":"MEQCID1ktxdOB06KKzXKXkQoLQrrOV+xyVnBg3/1S3XcwQaYAiAuvONoRqc9JQnJ2kuZfW3z+ariwUht5Ab0ZDfYpgAnKA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25937},"type":"module","module":"asyncllm.js","browser":"dist/asyncllm.js","exports":{".":"./dist/asyncllm.js","./gemini":"./dist/gemini.js","./anthropic":"./dist/anthropic.js"},"gitHead":"f2acbe0f88c307b62d7e599e3be8a74f2615b440","scripts":{"lint":"npm run lint:oxlint && npm run lint:js-md && npm run lint:html","test":"npx -y vitest run","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","lint:html":"npx -y js-beautify@1 '**/*.html' --type html --replace --indent-size 2 --max-preserve-newlines 1 --end-with-newline","lint:js-md":"npx -y prettier@3.5 --print-width 120 --write '**/*.js' '!**/*.min.js' '!dist/**' '**/*.md'","lint:oxlint":"npx -y oxlint --fix","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-asyncllm":"npx -y esbuild asyncllm.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","prepublishOnly":"npm run lint && npm run build && npm test","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js"},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"prettier":{"printWidth":120},"repository":{"url":"git+https://github.com/sanand0/asyncllm.git","type":"git"},"_npmVersion":"10.9.2","description":"Fetch streaming LLM responses as an async iterable","directories":{},"_nodeVersion":"23.10.0","dependencies":{"asyncsse":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","happy-dom":"^18.0.1"},"_npmOperationalInternal":{"tmp":"tmp/asyncllm_2.3.1_1753937731706_0.7934589271314174","host":"s3://npm-registry-packages-npm-production"}},"2.4.0":{"name":"asyncllm","version":"2.4.0","description":"Fetch streaming LLM responses as an async iterable","homepage":"https://github.com/sanand0/asyncllm#readme","repository":{"type":"git","url":"git+https://github.com/sanand0/asyncllm.git"},"license":"MIT","author":{"name":"Anand S","email":"root.node@gmail.com"},"type":"module","module":"asyncllm.js","prettier":{"printWidth":120},"browser":"dist/asyncllm.js","exports":{".":"./dist/asyncllm.js","./anthropic":"./dist/anthropic.js","./gemini":"./dist/gemini.js"},"scripts":{"build-asyncllm":"npx -y esbuild asyncllm.js --bundle --minify --format=esm --outfile=dist/asyncllm.js","build-gemini":"npx -y esbuild gemini.js --bundle --minify --format=esm --outfile=dist/gemini.js","build-anthropic":"npx -y esbuild anthropic.js --bundle --minify --format=esm --outfile=dist/anthropic.js","build":"npm run build-asyncllm && npm run build-gemini && npm run build-anthropic","lint:oxlint":"npx -y oxlint --fix","lint:js-md":"npx -y prettier@3.5 --print-width 120 --write '**/*.js' '!**/*.min.js' '!dist/**' '**/*.md'","lint:html":"npx -y js-beautify@1 '**/*.html' --type html --replace --indent-size 2 --max-preserve-newlines 1 --end-with-newline","lint":"npm run lint:oxlint && npm run lint:js-md && npm run lint:html","test":"npx -y vitest run","prepublishOnly":"npm run lint && npm run build && npm test"},"dependencies":{"asyncsse":"^1.3.1"},"keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"devDependencies":{"happy-dom":"^18.0.1","vitest":"^3.2.4"},"gitHead":"e38286f1513b33d9cd0e96440f633d300fca3d5c","_id":"asyncllm@2.4.0","bugs":{"url":"https://github.com/sanand0/asyncllm/issues"},"_nodeVersion":"25.2.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-4Q7KSqKGpbN3WXn6/7rs6ptM8MnPgWEGh4BRsYqVtQ03m6lYcm7f8n0TPmocrpfg0rqrn4wtwLuSrR3Yi1axkw==","shasum":"cb44b3c7673c0a9cb7a01040e40c42eb379cf31c","tarball":"https://registry.npmjs.org/asyncllm/-/asyncllm-2.4.0.tgz","fileCount":6,"unpackedSize":28052,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCxK7I3YNkBSGaFlYF5WAvouLmWmAp2hVpgakEHq0n9MQIhANHBi5iHPl7oaZJjlpSLDLOCZ3EMSii2qc/rOmFQMPaR"}]},"_npmUser":{"name":"sanand0","email":"root.node@gmail.com"},"directories":{},"maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/asyncllm_2.4.0_1766047718152_0.6896098009561371"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-15T15:49:29.107Z","modified":"2025-12-18T08:48:38.491Z","1.0.0":"2024-10-15T15:49:29.320Z","1.1.0":"2024-10-30T10:40:22.538Z","1.1.1":"2024-10-30T13:03:36.184Z","1.1.2":"2024-11-01T14:43:29.790Z","1.1.3":"2024-11-02T09:39:03.522Z","1.2.0":"2024-11-02T11:02:56.027Z","1.2.1":"2024-11-03T03:14:26.987Z","1.2.2":"2024-11-03T06:18:19.576Z","2.0.0":"2024-11-05T08:38:04.231Z","2.0.1":"2024-11-05T08:47:03.303Z","2.1.0":"2024-11-07T00:15:12.494Z","2.1.1":"2024-11-09T04:49:17.608Z","2.1.2":"2024-12-25T10:44:28.962Z","2.2.0":"2025-04-23T12:56:10.743Z","2.3.0":"2025-07-30T14:00:49.239Z","2.3.1":"2025-07-31T04:55:31.891Z","2.4.0":"2025-12-18T08:48:38.289Z"},"bugs":{"url":"https://github.com/sanand0/asyncllm/issues"},"author":{"name":"Anand S","email":"root.node@gmail.com"},"license":"MIT","homepage":"https://github.com/sanand0/asyncllm#readme","keywords":["sse","fetch","async","iterable","server-sent-events","streaming","llm","openai","anthropic","gemini","cloudflare"],"repository":{"type":"git","url":"git+https://github.com/sanand0/asyncllm.git"},"description":"Fetch streaming LLM responses as an async iterable","maintainers":[{"name":"sanand0","email":"root.node@gmail.com"}],"readme":"# asyncLLM\n\n[![npm version](https://img.shields.io/npm/v/asyncllm.svg)](https://www.npmjs.com/package/asyncllm)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/asyncllm)](https://bundlephobia.com/package/asyncllm)\n\nFetch LLM responses across multiple providers as an async iterable.\n\n- 🚀 Lightweight (~2KB) and dependency-free\n- 🔄 Works with multiple LLM providers (OpenAI, Anthropic, Gemini, and more)\n- 🌐 Browser and Node.js compatible\n- 📦 Easy to use with ES modules\n\n## Installation\n\nAdd this to your script:\n\n```js\nimport { asyncLLM } from \"asyncllm\";\n```\n\nTo use via CDN, add this to your HTML file:\n\n```html\n<script type=\"importmap\">\n  {\n    \"imports\": {\n      \"asyncllm\": \"https://cdn.jsdelivr.net/npm/asyncllm@1\"\n    }\n  }\n</script>\n```\n\nTo use locally, install via `npm`:\n\n```bash\nnpm install asyncllm\n```\n\n... and add this to your HTML file:\n\n```html\n<script type=\"importmap\">\n  {\n    \"imports\": {\n      \"asyncllm\": \"./node_modules/asyncllm/dist/asyncllm.js\"\n    }\n  }\n</script>\n```\n\n## Usage\n\n### Streaming\n\nCall `asyncLLM()` just like you would use `fetch` with any LLM provider with streaming responses.\n\n- [OpenAI Chat Completion Streaming](https://platform.openai.com/docs/api-reference/chat-streaming). Many providers including\n  [Anthropic](https://docs.anthropic.com/en/api/openai-sdk),\n  [Gemini](https://ai.google.dev/gemini-api/docs/openai),\n  [Vertex AI](https://cloud.google.com/vertex-ai/generative-ai/docs/start/openai),\n  [OpenRouter](https://openrouter.ai/docs/quickstart),\n  [Groq](https://console.groq.com/docs/api-reference#chat-create),\n  [Cerebras](https://inference-docs.cerebras.ai/resources/openai),\n  [Azure](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/reference),\n  etc. follow the OpenAI Chat Completion API.\n- [OpenAI Responses API Streaming](https://platform.openai.com/docs/api-reference/responses-streaming).\n- [Anthropic Streaming](https://docs.anthropic.com/en/api/messages-streaming)\n- [Gemini Streaming](https://ai.google.dev/gemini-api/docs/text-generation?lang=rest#generate-a-text-stream)\n- [Gemini Interactions API Streaming](https://ai.google.dev/gemini-api/docs/interactions)\n\nThe result is an async generator that yields objects with `content`, `error`, `tools`, and `message` properties.\n\nFor example, to update the DOM with the LLM's response:\n\n```javascript\nimport { asyncLLM } from \"https://cdn.jsdelivr.net/npm/asyncllm@2\";\n\nconst body = {\n  model: \"gpt-5-nano\",\n  // You MUST enable streaming, else the API will return an {error}\n  stream: true,\n  messages: [{ role: \"user\", content: \"Hello, world!\" }],\n};\n\nfor await (const { content, error } of asyncLLM(\"https://api.openai.com/v1/chat/completions\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application/json\", Authorization: `Bearer ${apiKey}` },\n  body: JSON.stringify(body),\n})) {\n  if (content) document.getElementById(\"output\").textContent = content;\n}\n```\n\nThis will log something like this on the console:\n\n```js\n{ content: \"\", message: { \"id\": \"chatcmpl-...\", ...} }\n{ content: \"Hello\", message: { \"id\": \"chatcmpl-...\", ...} }\n{ content: \"Hello!\", message: { \"id\": \"chatcmpl-...\", ...} }\n{ content: \"Hello! How\", message: { \"id\": \"chatcmpl-...\", ...} }\n...\n{ content: \"Hello! How can I assist you today?\", message: { \"id\": \"chatcmpl-...\", ...} }\n```\n\n### Anthropic and Gemini Adapters\n\nAdapters convert OpenAI chat completions request bodies to the [Anthropic](https://docs.anthropic.com/en/api/messages) or [Gemini](https://ai.google.dev/gemini-api/docs/text-generation?lang=rest) formats. For example:\n\n```javascript\nimport { anthropic } from \"https://cdn.jsdelivr.net/npm/asyncllm@2/dist/anthropic.js\";\nimport { gemini } from \"https://cdn.jsdelivr.net/npm/asyncllm@2/dist/gemini.js\";\n\n// Create an OpenAI chat completions request\nconst body = {\n  messages: [{ role: \"user\", content: \"Hello, world!\" }],\n  temperature: 0.5,\n};\n\n// Fetch request with the Anthropic API\nconst anthropicResponse = await fetch(\"https://api.anthropic.com/v1/messages\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application/json\", \"x-api-key\": \"YOUR_API_KEY\" },\n  // anthropic() converts the OpenAI chat completions request to Anthropic's format\n  body: JSON.stringify(anthropic({ ...body, model: \"claude-3-haiku-20240307\" })),\n}).then((r) => r.json());\n\n// Fetch request with the Gemini API\nconst geminiResponse = await fetch(\n  \"https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-8b:generateContent\",\n  {\n    method: \"POST\",\n    headers: { \"Content-Type\": \"application/json\", Authorization: `Bearer YOUR_API_KEY` },\n    // gemini() converts the OpenAI chat completions request to Gemini's format\n    body: JSON.stringify(gemini(body)),\n  },\n).then((r) => r.json());\n```\n\nHere are the parameters supported by each provider.\n\n| OpenAI Parameter                    | Anthropic | Gemini |\n| ----------------------------------- | --------- | ------ |\n| messages                            | Y         | Y      |\n| system message                      | Y         | Y      |\n| temperature                         | Y         | Y      |\n| max_tokens                          | Y         | Y      |\n| top_p                               | Y         | Y      |\n| stop sequences                      | Y         | Y      |\n| stream                              | Y         | Y      |\n| presence_penalty                    |           | Y      |\n| frequency_penalty                   |           | Y      |\n| logprobs                            |           | Y      |\n| top_logprobs                        |           | Y      |\n| n (multiple candidates)             |           | Y      |\n| metadata.user_id                    | Y         |        |\n| tools/functions                     | Y         | Y      |\n| tool_choice                         | Y         | Y      |\n| parallel_tool_calls                 | Y         |        |\n| response_format.type: \"json_object\" |           | Y      |\n| response_format.type: \"json_schema\" |           | Y      |\n\nContent types:\n\n| OpenAI | Anthropic | Gemini |\n| ------ | --------- | ------ |\n| Text   | Y         | Y      |\n| Images | Y         | Y      |\n| Audio  |           | Y      |\n\nImage Sources\n\n| OpenAI Parameter | Anthropic | Gemini |\n| ---------------- | --------- | ------ |\n| Data URI         | Y         | Y      |\n| External URLs    |           | Y      |\n\n### OpenAI Responses API streaming\n\n```javascript\nimport { asyncLLM } from \"https://cdn.jsdelivr.net/npm/asyncllm@2\";\n\nconst body = {\n  model: \"gpt-5-mini\",\n  // You MUST enable streaming, else the API will return an {error}\n  stream: true,\n  input: \"Hello, world!\",\n};\n\nfor await (const data of asyncLLM(\"https://api.openai.com/v1/responses\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application/json\", Authorization: `Bearer ${apiKey}` },\n  body: JSON.stringify(body),\n})) {\n  console.log(data);\n}\n```\n\nThis will log something like this on the console:\n\n```js\n{ content: \"Hello\", message: { \"item_id\": \"msg_...\", ...} }\n{ content: \"Hello!\", message: { \"item_id\": \"msg_...\", ...} }\n{ content: \"Hello! How\", message: { \"item_id\": \"msg_...\", ...} }\n...\n{ content: \"Hello! How can I assist you today?\", message: { \"item_id\": \"msg_...\", ...} }\n```\n\n### Anthropic streaming\n\nThe package includes an Anthropic adapter that converts OpenAI chat completions requests to Anthropic's format,\nallowing you to use the same code structure across providers.\n\n```javascript\nimport { asyncLLM } from \"https://cdn.jsdelivr.net/npm/asyncllm@2\";\nimport { anthropic } from \"https://cdn.jsdelivr.net/npm/asyncllm@2/dist/anthropic.js\";\n\n// You can use the anthropic() adapter to convert OpenAI chat completions requests to Anthropic's format.\nconst body = anthropic({\n  // Same as OpenAI example above\n});\n\n// Or you can use the asyncLLM() function directly with the Anthropic API endpoint.\nconst body = {\n  model: \"claude-3-haiku-20240307\",\n  // You MUST enable streaming, else the API will return an {error}\n  stream: true,\n  max_tokens: 10,\n  messages: [{ role: \"user\", content: \"What is 2 + 2\" }],\n};\n\nfor await (const data of asyncLLM(\"https://api.anthropic.com/v1/messages\", {\n  headers: { \"Content-Type\": \"application/json\", \"x-api-key\": apiKey },\n  body: JSON.stringify(body),\n})) {\n  console.log(data);\n}\n```\n\n### Gemini streaming\n\nThe package includes a Gemini adapter that converts OpenAI chat completions requests to Gemini's format,\nallowing you to use the same code structure across providers.\n\n```javascript\nimport { asyncLLM } from \"https://cdn.jsdelivr.net/npm/asyncllm@2\";\nimport { gemini } from \"https://cdn.jsdelivr.net/npm/asyncllm@2/dist/gemini.js\";\n\n// You can use the gemini() adapter to convert OpenAI chat completions requests to Gemini's format.\nconst body = gemini({\n  // Same as OpenAI example above\n});\n\n// Or you can use the asyncLLM() function directly with the Gemini API endpoint.\nconst body = {\n  contents: [{ role: \"user\", parts: [{ text: \"What is 2+2?\" }] }],\n};\n\nfor await (const data of asyncLLM(\n  // You MUST use a streaming endpoint, else the API will return an {error}\n  \"https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-8b:streamGenerateContent?alt=sse\",\n  {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application/json\",\n      \"x-goog-api-key\": apiKey,\n    },\n    body: JSON.stringify(body),\n  },\n)) {\n  console.log(data);\n}\n```\n\n### Gemini Interactions API streaming\n\nGemini also supports streaming via the [Interactions API](https://ai.google.dev/gemini-api/docs/interactions), which is similar\nto OpenAI's Responses API and supports tools/function calls and server-side state.\n\n```javascript\nimport { asyncLLM } from \"https://cdn.jsdelivr.net/npm/asyncllm@2\";\n\nconst body = {\n  model: \"gemini-2.5-flash\",\n  stream: true,\n  input: \"Say exactly: OK\",\n};\n\nfor await (const data of asyncLLM(\"https://generativelanguage.googleapis.com/v1beta/interactions?alt=sse\", {\n  method: \"POST\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    \"x-goog-api-key\": apiKey,\n  },\n  body: JSON.stringify(body),\n})) {\n  console.log(data);\n}\n```\n\n### Function Calling\n\nasyncLLM supports function calling (aka tools). Here's an example with OpenAI chat completions:\n\n```javascript\nfor await (const { tools } of asyncLLM(\"https://api.openai.com/v1/chat/completions\", {\n  method: \"POST\",\n  headers: {\n    \"Content-Type\": \"application/json\",\n    Authorization: `Bearer ${apiKey}`,\n  },\n  body: JSON.stringify({\n    model: \"gpt-5-nano\",\n    stream: true,\n    messages: [\n      { role: \"system\", content: \"Get delivery date for order\" },\n      { role: \"user\", content: \"Order ID: 123456\" },\n    ],\n    tool_choice: \"required\",\n    tools: [\n      {\n        type: \"function\",\n        function: {\n          name: \"get_delivery_date\",\n          parameters: { type: \"object\", properties: { order_id: { type: \"string\" } }, required: [\"order_id\"] },\n        },\n      },\n    ],\n  }),\n})) {\n  console.log(JSON.stringify(tools));\n}\n```\n\n`tools` is an array of objects with `name`, `id` (for OpenAI/Anthropic, and Gemini Interactions), and `args` properties. It streams like this:\n\n```json\n[{\"name\":\"get_delivery_date\",\"id\":\"call_F8YHCjnzrrTjfE4YSSpVW2Bc\",\"args\":\"\"}]\n[{\"name\":\"get_delivery_date\",\"id\":\"call_F8YHCjnzrrTjfE4YSSpVW2Bc\",\"args\":\"{\\\"\"}]\n[{\"name\":\"get_delivery_date\",\"id\":\"call_F8YHCjnzrrTjfE4YSSpVW2Bc\",\"args\":\"{\\\"order\"}]\n[{\"name\":\"get_delivery_date\",\"id\":\"call_F8YHCjnzrrTjfE4YSSpVW2Bc\",\"args\":\"{\\\"order_id\"}]\n[{\"name\":\"get_delivery_date\",\"id\":\"call_F8YHCjnzrrTjfE4YSSpVW2Bc\",\"args\":\"{\\\"order_id\\\":\\\"\"}]\n[{\"name\":\"get_delivery_date\",\"id\":\"call_F8YHCjnzrrTjfE4YSSpVW2Bc\",\"args\":\"{\\\"order_id\\\":\\\"123\"}]\n[{\"name\":\"get_delivery_date\",\"id\":\"call_F8YHCjnzrrTjfE4YSSpVW2Bc\",\"args\":\"{\\\"order_id\\\":\\\"123456\"}]\n[{\"name\":\"get_delivery_date\",\"id\":\"call_F8YHCjnzrrTjfE4YSSpVW2Bc\",\"args\":\"{\\\"order_id\\\":\\\"123456\\\"}\"}]\n```\n\nUse a library like [partial-json](https://www.npmjs.com/package/partial-json) to parse the `args` incrementally.\n\n### Streaming Config\n\nasyncLLM accepts a `config` object with the following properties:\n\n- `fetch`: Custom fetch implementation (defaults to global `fetch`).\n- `onResponse`: Async callback function that receives the Response object before streaming begins. If the callback returns a promise, it will be awaited before continuing the stream.\n\nHere's how you can use a custom fetch implementation:\n\n```javascript\nimport { asyncLLM } from \"https://cdn.jsdelivr.net/npm/asyncllm@2\";\n\nconst body = {\n  // Same as OpenAI example above\n};\n\n// Optional configuration. You can ignore it for most use cases.\nconst config = {\n  onResponse: async (response) => {\n    console.log(response.status, response.headers);\n  },\n  // You can use a custom fetch implementation if needed\n  fetch: fetch,\n};\n\nfor await (const { content } of asyncLLM(\n  \"https://api.openai.com/v1/chat/completions\",\n  {\n    method: \"POST\",\n    headers: { \"Content-Type\": \"application/json\", Authorization: `Bearer ${apiKey}` },\n    body: JSON.stringify(body),\n  },\n  config,\n)) {\n  console.log(content);\n}\n```\n\n### Streaming from text\n\nYou can parse streamed SSE events from a text string (e.g. from a cached response) using the provided `fetchText` helper:\n\n```javascript\nimport { asyncLLM } from \"https://cdn.jsdelivr.net/npm/asyncllm@2\";\nimport { fetchText } from \"https://cdn.jsdelivr.net/npm/asyncsse@1/dist/fetchtext.js\";\n\nconst text = `\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"2\"}],\"role\": \"model\"}}]}\n\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \" + 2 = 4\\\\n\"}],\"role\": \"model\"}}]}\n\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"\"}],\"role\": \"model\"}}]}\n`;\n\n// Stream events from text\nfor await (const event of asyncLLM(text, {}, { fetch: fetchText })) {\n  console.log(event);\n}\n```\n\nThis outputs:\n\n```\n{ data: \"Hello\" }\n{ data: \"World\" }\n```\n\nThis is particularly useful for testing SSE parsing without making actual HTTP requests.\n\n### Error handling\n\nIf an error occurs, it will be yielded in the `error` property. For example:\n\n```javascript\nfor await (const { content, error } of asyncLLM(\"https://api.openai.com/v1/chat/completions\", {\n  method: \"POST\",\n  // ...\n})) {\n  if (error) console.error(error);\n  else console.log(content);\n}\n```\n\nThe `error` property is set if:\n\n- The underlying API (e.g. OpenAI, Anthropic, Gemini) returns an error in the response (e.g. `error.message` or `message.error` or `error`)\n- The fetch request fails (e.g. network error)\n- The response body cannot be parsed as JSON\n\n## API\n\n### `asyncLLM(request: string | Request, options?: RequestInit, config?: SSEConfig): AsyncGenerator<LLMEvent, void, unknown>`\n\nFetches streaming responses from LLM providers and yields events.\n\n- `request`: The URL or Request object for the LLM API endpoint\n- `options`: Optional [fetch options](https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters)\n- `config`: Optional configuration object for SSE handling\n  - `fetch`: Custom fetch implementation (defaults to global fetch)\n  - `onResponse`: Async callback function that receives the Response object before streaming begins. If the callback returns a promise, it will be awaited before continuing the stream.\n\nReturns an async generator that yields [`LLMEvent` objects](#llmevent).\n\n#### LLMEvent\n\n- `content`: The text content of the response\n- `tools`: Array of tool call objects with:\n  - `name`: The name of the tool being called\n  - `args`: The arguments for the tool call as a JSON-encoded string, e.g. `{\"order_id\":\"123456\"}`\n  - `id`: Optional unique identifier for the tool call (e.g. OpenAI's `call_F8YHCjnzrrTjfE4YSSpVW2Bc` or Anthropic's `toolu_01T1x1fJ34qAmk2tNTrN7Up6`. Gemini does not return an id.)\n- `message`: The raw message object from the LLM provider (may include id, model, usage stats, etc.)\n- `error`: Error message if the request fails\n\n### Node.js usage\n\n```javascript\nimport { asyncLLM } from \"asyncllm\";\n\n// Rest of the usage is the same as in the browser examples\n```\n\n## Development\n\n```bash\ngit clone https://github.com/sanand0/asyncllm.git\ncd asyncllm\n\nnpm install\nnpm run lint && npm run build && npm test\n\nnpm publish\ngit commit . -m\"$COMMIT_MSG\"; git tag $VERSION; git push --follow-tags\n```\n\n## Release notes\n\n- [2.4.0](https://npmjs.com/package/asyncllm/v/2.4.0): 18 Dec 2025: Added Gemini Interactions API streaming support (text, tools, completion metadata)\n- [2.3.1](https://npmjs.com/package/asyncllm/v/2.3.1): 31 Jul 2025: Standardized package.json & README.md, renamed index.js to asyncllm.js\n- [2.2.0](https://npmjs.com/package/asyncllm/v/2.2.0): 23 Apr 2025. Added [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses-streaming)\n- [2.1.2](https://npmjs.com/package/asyncllm/v/2.1.2): 25 Dec 2024. Update repo links\n- [2.1.1](https://npmjs.com/package/asyncllm/v/2.1.1): 9 Nov 2024. Document standalone adapter usage\n- [2.1.0](https://npmjs.com/package/asyncllm/v/2.1.0): 7 Nov 2024. Added `id` to tools to support unique tool call identifiers from providers\n- [2.0.1](https://npmjs.com/package/asyncllm/v/2.0.1): 5 Nov 2024. Multiple tools support. **Breaking change**: `tool` and `args` are not part of the response. Instead, it has `tools`, an array of `{ name, args }`. Gemini adapter returns `toolConfig` instead of `toolsConfig`\n- [1.2.2](https://npmjs.com/package/asyncllm/v/1.2.2): 3 Nov 2024. Added streaming from text documentation via `config.fetch`. Upgrade to asyncSSE 1.3.1 (bug fix).\n- [1.2.1](https://npmjs.com/package/asyncllm/v/1.2.1): 3 Nov 2024. Added `config.fetch` for custom fetch implementation\n- [1.2.0](https://npmjs.com/package/asyncllm/v/1.2.0): 2 Nov 2024. Added `config.onResponse(response)` that receives the Response object before streaming begins\n- [1.1.3](https://npmjs.com/package/asyncllm/v/1.1.3): 2 Nov 2024. Ensure `max_tokens` for Anthropic. Improve error handling\n- [1.1.1](https://npmjs.com/package/asyncllm/v/1.1.1): 30 Oct 2024. Added [Anthropic adapter](#anthropic)\n- [1.1.0](https://npmjs.com/package/asyncllm/v/1.1.0): 30 Oct 2024. Added [Gemini adapter](#gemini)\n- [1.0.0](https://npmjs.com/package/asyncllm/v/1.0.0): 15 Oct 2024. Initial release with [asyncLLM](#asyncllm) and [LLMEvent](#llmevent)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","readmeFilename":"README.md"}