ai-protocol-adapters 1.0.0-alpha.13 → 1.0.0-alpha.15
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/index.js +2 -5
- package/dist/index.mjs +2 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4046,14 +4046,14 @@ var StreamingProtocolAdapter = class {
|
|
|
4046
4046
|
}
|
|
4047
4047
|
sseLines.push(
|
|
4048
4048
|
"event: content_block_start",
|
|
4049
|
-
'data: {"type":"content_block_start","index":0,"content_block":{"type":"
|
|
4049
|
+
'data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":""}}',
|
|
4050
4050
|
""
|
|
4051
4051
|
);
|
|
4052
4052
|
state.thinkingBlockStarted = true;
|
|
4053
4053
|
}
|
|
4054
4054
|
sseLines.push(
|
|
4055
4055
|
"event: content_block_delta",
|
|
4056
|
-
`data: {"type":"content_block_delta","index":0,"delta":{"type":"
|
|
4056
|
+
`data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"${this.escapeJsonString(content)}"}}`,
|
|
4057
4057
|
""
|
|
4058
4058
|
);
|
|
4059
4059
|
}
|
|
@@ -4061,9 +4061,6 @@ var StreamingProtocolAdapter = class {
|
|
|
4061
4061
|
if (!content || content === "") return;
|
|
4062
4062
|
if (state.thinkingBlockStarted && !state.contentBlockStarted) {
|
|
4063
4063
|
sseLines.push(
|
|
4064
|
-
"event: content_block_delta",
|
|
4065
|
-
'data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"</thinking>\\n\\n"}}',
|
|
4066
|
-
"",
|
|
4067
4064
|
"event: content_block_stop",
|
|
4068
4065
|
'data: {"type":"content_block_stop","index":0}',
|
|
4069
4066
|
"",
|
package/dist/index.mjs
CHANGED
|
@@ -3939,14 +3939,14 @@ var StreamingProtocolAdapter = class {
|
|
|
3939
3939
|
}
|
|
3940
3940
|
sseLines.push(
|
|
3941
3941
|
"event: content_block_start",
|
|
3942
|
-
'data: {"type":"content_block_start","index":0,"content_block":{"type":"
|
|
3942
|
+
'data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":""}}',
|
|
3943
3943
|
""
|
|
3944
3944
|
);
|
|
3945
3945
|
state.thinkingBlockStarted = true;
|
|
3946
3946
|
}
|
|
3947
3947
|
sseLines.push(
|
|
3948
3948
|
"event: content_block_delta",
|
|
3949
|
-
`data: {"type":"content_block_delta","index":0,"delta":{"type":"
|
|
3949
|
+
`data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"${this.escapeJsonString(content)}"}}`,
|
|
3950
3950
|
""
|
|
3951
3951
|
);
|
|
3952
3952
|
}
|
|
@@ -3954,9 +3954,6 @@ var StreamingProtocolAdapter = class {
|
|
|
3954
3954
|
if (!content || content === "") return;
|
|
3955
3955
|
if (state.thinkingBlockStarted && !state.contentBlockStarted) {
|
|
3956
3956
|
sseLines.push(
|
|
3957
|
-
"event: content_block_delta",
|
|
3958
|
-
'data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"</thinking>\\n\\n"}}',
|
|
3959
|
-
"",
|
|
3960
3957
|
"event: content_block_stop",
|
|
3961
3958
|
'data: {"type":"content_block_stop","index":0}',
|
|
3962
3959
|
"",
|
package/package.json
CHANGED