vectocore4 0.0.25 → 0.0.27

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.
package/dist/cjs/index.js CHANGED
@@ -348,10 +348,11 @@ class Lens {
348
348
  requestParam.params.custom_system_prompt = customSystemPrompt;
349
349
  let response = yield this.requestStream(requestParam);
350
350
  if (stream) {
351
- return response.body.getReader();
351
+ return response;
352
352
  }
353
353
  else {
354
- return response.json();
354
+ const res = yield this.genStreamResponse(response);
355
+ return res;
355
356
  }
356
357
  });
357
358
  }
package/dist/mjs/index.js CHANGED
@@ -308,10 +308,11 @@ export class Lens {
308
308
  requestParam.params.custom_system_prompt = customSystemPrompt;
309
309
  let response = await this.requestStream(requestParam);
310
310
  if (stream) {
311
- return response.body.getReader();
311
+ return response;
312
312
  }
313
313
  else {
314
- return response.json();
314
+ const res = await this.genStreamResponse(response);
315
+ return res;
315
316
  }
316
317
  }
317
318
  async history({ sessionKey, limit }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vectocore4",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "description": "",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/cjs/index.js",