@flutchai/flutch-sdk 0.6.6 → 0.6.7
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.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5113,6 +5113,16 @@ function _ts_decorate21(decorators, target, key, desc) {
|
|
|
5113
5113
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5114
5114
|
}
|
|
5115
5115
|
__name(_ts_decorate21, "_ts_decorate");
|
|
5116
|
+
function joinTextSteps(parts) {
|
|
5117
|
+
let out = "";
|
|
5118
|
+
for (const part of parts) {
|
|
5119
|
+
if (!part) continue;
|
|
5120
|
+
if (!out || /\s$/.test(out) || /^\s/.test(part)) out += part;
|
|
5121
|
+
else out += "\n\n" + part;
|
|
5122
|
+
}
|
|
5123
|
+
return out;
|
|
5124
|
+
}
|
|
5125
|
+
__name(joinTextSteps, "joinTextSteps");
|
|
5116
5126
|
exports.EventProcessor = class _EventProcessor {
|
|
5117
5127
|
static {
|
|
5118
5128
|
__name(this, "EventProcessor");
|
|
@@ -5548,7 +5558,7 @@ exports.EventProcessor = class _EventProcessor {
|
|
|
5548
5558
|
totalEvents: acc.traceEvents.length
|
|
5549
5559
|
} : null;
|
|
5550
5560
|
const textChain = allChains.find((c) => c.channel === "text");
|
|
5551
|
-
const text = textChain ? textChain.steps.filter((step) => step.type === "text").map((step) => step.text || "")
|
|
5561
|
+
const text = textChain ? joinTextSteps(textChain.steps.filter((step) => step.type === "text").map((step) => step.text || "")) : "";
|
|
5552
5562
|
this.logger.log("\u{1F4CA} [EventProcessor] Final result assembled", {
|
|
5553
5563
|
totalChains: allChains.length,
|
|
5554
5564
|
textChains: allChains.filter((c) => c.channel === "text").length,
|
|
@@ -8683,6 +8693,7 @@ exports.isInternalMode = isInternalMode;
|
|
|
8683
8693
|
exports.isReasoningBlock = isReasoningBlock;
|
|
8684
8694
|
exports.isReasoningModel = isReasoningModel;
|
|
8685
8695
|
exports.isSendableReasoningBlock = isSendableReasoningBlock;
|
|
8696
|
+
exports.joinTextSteps = joinTextSteps;
|
|
8686
8697
|
exports.loadOAuthProviders = loadOAuthProviders;
|
|
8687
8698
|
exports.modelAcceptsSamplingParams = modelAcceptsSamplingParams;
|
|
8688
8699
|
exports.modelSupportsPromptCache = modelSupportsPromptCache;
|