@flutchai/flutch-sdk 0.7.3 → 0.7.4
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 +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5960,6 +5960,10 @@ var LangGraphEngine = class _LangGraphEngine {
|
|
|
5960
5960
|
traceEvents: trace?.events?.length || 0,
|
|
5961
5961
|
hadError: !!streamError
|
|
5962
5962
|
});
|
|
5963
|
+
if (streamError && isRecursionLimit(streamError) && content?.text?.trim()) {
|
|
5964
|
+
this.logger.warn(`[STREAM-ERROR] Recursion limit reached after the answer was written; returning the answer`);
|
|
5965
|
+
return content;
|
|
5966
|
+
}
|
|
5963
5967
|
if (streamError) {
|
|
5964
5968
|
throw streamError;
|
|
5965
5969
|
}
|
|
@@ -6168,6 +6172,10 @@ LangGraphEngine = _ts_decorate22([
|
|
|
6168
6172
|
typeof ConfigService === "undefined" ? Object : ConfigService
|
|
6169
6173
|
])
|
|
6170
6174
|
], LangGraphEngine);
|
|
6175
|
+
function isRecursionLimit(error) {
|
|
6176
|
+
return error.name === "GraphRecursionError" || /Recursion limit of \d+ reached/.test(error.message);
|
|
6177
|
+
}
|
|
6178
|
+
__name(isRecursionLimit, "isRecursionLimit");
|
|
6171
6179
|
|
|
6172
6180
|
// src/engines/graph-engine.factory.ts
|
|
6173
6181
|
function _ts_decorate23(decorators, target, key, desc) {
|