@cpzxrobot/sdk 1.3.130 → 1.3.131

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.
@@ -116,7 +116,7 @@ class WebPlatform {
116
116
  else if (line.startsWith("data:")) {
117
117
  // remove prefix 'data: '
118
118
  // 移除前缀 'data: '
119
- var data = JSON.parse(line.split(":")[1]);
119
+ var data = JSON.parse(line.substring(5));
120
120
  //{"choices":[{"delta":{"content":" </"},"index":0}],"created":1741749068,"id":"chatcmpl-67ccb889154043f5874cbf3a64ec163e","model":"DeepSeek-R1","object":"chat.completion.chunk"}
121
121
  fn === null || fn === void 0 ? void 0 : fn(data);
122
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.130",
3
+ "version": "1.3.131",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/web_platform.ts CHANGED
@@ -124,7 +124,7 @@ export class WebPlatform implements PlatformInterface {
124
124
  } else if (line.startsWith("data:")) {
125
125
  // remove prefix 'data: '
126
126
  // 移除前缀 'data: '
127
- var data = JSON.parse(line.split(":")[1]!);
127
+ var data = JSON.parse(line.substring(5));
128
128
  //{"choices":[{"delta":{"content":" </"},"index":0}],"created":1741749068,"id":"chatcmpl-67ccb889154043f5874cbf3a64ec163e","model":"DeepSeek-R1","object":"chat.completion.chunk"}
129
129
  fn?.(data);
130
130
  }