koishi-plugin-chatluna-google-gemini-adapter 1.2.4 → 1.2.5

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/lib/index.cjs CHANGED
@@ -425,6 +425,9 @@ var GeminiRequester = class extends import_api.ModelRequester {
425
425
  });
426
426
  const transformToChatPartStream = new TransformStream({
427
427
  async transform(chunk, controller) {
428
+ if (chunk === "undefined") {
429
+ return;
430
+ }
428
431
  const parsedValue = JSON.parse(chunk);
429
432
  const transformValue = parsedValue;
430
433
  if (!transformValue.candidates) {
package/lib/index.mjs CHANGED
@@ -408,6 +408,9 @@ var GeminiRequester = class extends ModelRequester {
408
408
  });
409
409
  const transformToChatPartStream = new TransformStream({
410
410
  async transform(chunk, controller) {
411
+ if (chunk === "undefined") {
412
+ return;
413
+ }
411
414
  const parsedValue = JSON.parse(chunk);
412
415
  const transformValue = parsedValue;
413
416
  if (!transformValue.candidates) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-chatluna-google-gemini-adapter",
3
3
  "description": "google-gemini adapter for chatluna",
4
- "version": "1.2.4",
4
+ "version": "1.2.5",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.mjs",
7
7
  "typings": "lib/index.d.ts",
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "peerDependencies": {
74
74
  "koishi": "^4.18.7",
75
- "koishi-plugin-chatluna": "^1.3.0-alpha.3"
75
+ "koishi-plugin-chatluna": "^1.3.0-alpha.4"
76
76
  },
77
77
  "koishi": {
78
78
  "description": {