@s2-dev/resumable-stream
npm package.
This is inspired by Vercel’s take on stream resumption.
Prerequisites
-
Sign up here, generate an access token and set it as
S2_ACCESS_TOKEN
in your env. -
Create a new basin from the Basins tab with the Create Stream on Append option enabled, and set it as
S2_BASIN
in your env.
S2_BATCH_SIZE
.
Ingegrating with the Chat SDK
Import the Package
route.ts
Stream Creation
route.ts
Stream Resumption
route.ts