@ray-js/t-agent-plugin-aistream 0.2.1-beta.2 → 0.2.1-beta.3

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.
@@ -1573,7 +1573,8 @@ export type ReceivedTextAsrPacket = ReceivedTextPacketBase<ReceivedTextPacketTyp
1573
1573
  text: string;
1574
1574
  }>;
1575
1575
  export type ReceivedTextNlgPacket = ReceivedTextPacketBase<ReceivedTextPacketType.NLG, {
1576
- content: string;
1576
+ reasoningContent?: string;
1577
+ content?: string;
1577
1578
  appendMode: 'append';
1578
1579
  finish: boolean;
1579
1580
  }>;
@@ -144,11 +144,13 @@ export function sendBlocksToAIStream(params) {
144
144
  }
145
145
  const packet = safeParseJSON(data.body.text);
146
146
  if (packet.bizType === ReceivedTextPacketType.NLG) {
147
- logger.debug('sendBlocksToAIStream Receive NLG', packet.data.content);
148
- const text = prevText + packet.data.content;
147
+ // TODO: 处理 reasoningContent 推理能力
148
+ const delta = packet.data.content || '';
149
+ logger.debug('sendBlocksToAIStream Receive NLG', delta);
150
+ const text = prevText + delta;
149
151
  enqueue({
150
152
  type: 'text',
151
- delta: packet.data.content,
153
+ delta,
152
154
  text,
153
155
  meta
154
156
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/t-agent-plugin-aistream",
3
- "version": "0.2.1-beta.2",
3
+ "version": "0.2.1-beta.3",
4
4
  "author": "Tuya.inc",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "@types/url-parse": "^1.4.11"
37
37
  },
38
- "gitHead": "3d7b5c0ca1816855f1a0c4a2da3e59ad44f1b6da"
38
+ "gitHead": "6fb3ba83a8b1a980b000506781a43e75403f3211"
39
39
  }