open-agents-ai 0.159.0 → 0.160.0
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 +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27435,8 +27435,15 @@ ${transcript}`
|
|
|
27435
27435
|
}
|
|
27436
27436
|
if (chunk.type === "content" && chunk.content) {
|
|
27437
27437
|
content += chunk.content;
|
|
27438
|
-
let kind = inThinkTag ? "thinking" : "content";
|
|
27439
27438
|
const fragment = chunk.content;
|
|
27439
|
+
let kind;
|
|
27440
|
+
if (chunk.thinking) {
|
|
27441
|
+
kind = "thinking";
|
|
27442
|
+
} else if (inThinkTag) {
|
|
27443
|
+
kind = "thinking";
|
|
27444
|
+
} else {
|
|
27445
|
+
kind = "content";
|
|
27446
|
+
}
|
|
27440
27447
|
if (fragment.includes("<think>")) {
|
|
27441
27448
|
inThinkTag = true;
|
|
27442
27449
|
kind = "thinking";
|
|
@@ -27637,6 +27644,9 @@ ${transcript}`
|
|
|
27637
27644
|
continue;
|
|
27638
27645
|
const delta = choice.delta;
|
|
27639
27646
|
const finishReason = choice.finish_reason;
|
|
27647
|
+
if (delta?.reasoning) {
|
|
27648
|
+
yield { type: "content", content: delta.reasoning, thinking: true };
|
|
27649
|
+
}
|
|
27640
27650
|
if (delta?.content) {
|
|
27641
27651
|
yield { type: "content", content: delta.content };
|
|
27642
27652
|
}
|
package/package.json
CHANGED