@nemesis-oss/ollama-sdk 1.24.1 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -191,10 +191,11 @@ async function* parseNdjsonStream(stream) {
191
191
  // src/streaming/sse.ts
192
192
  function dispatch(event, data, id, retry) {
193
193
  if (data.length === 0) return void 0;
194
- const joined = data.join("\n");
194
+ const buffer = data.map((line) => `${line}
195
+ `).join("");
195
196
  return {
196
197
  ...event !== void 0 ? { event } : {},
197
- data: joined.endsWith("\n") ? joined.slice(0, -1) : joined,
198
+ data: buffer.slice(0, -1),
198
199
  ...id !== void 0 ? { id } : {},
199
200
  ...retry !== void 0 ? { retry } : {}
200
201
  };