@flutchai/flutch-sdk 0.6.1 → 0.6.2
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 +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -328,6 +328,7 @@ interface IGraphResponsePayload {
|
|
|
328
328
|
text: string;
|
|
329
329
|
attachments?: IAttachment[];
|
|
330
330
|
reasoningChains?: IReasoningChain[];
|
|
331
|
+
contentChains?: IContentChain[];
|
|
331
332
|
metadata: {
|
|
332
333
|
usageMetrics: IUsageMetrics;
|
|
333
334
|
[key: string]: any;
|
|
@@ -1474,6 +1475,7 @@ declare class UniversalGraphService implements IGraphService {
|
|
|
1474
1475
|
attachments: any;
|
|
1475
1476
|
metadata: any;
|
|
1476
1477
|
reasoningChains: any;
|
|
1478
|
+
contentChains: any;
|
|
1477
1479
|
}>;
|
|
1478
1480
|
healthCheck(): Promise<boolean>;
|
|
1479
1481
|
cancelGeneration(requestId: string): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -328,6 +328,7 @@ interface IGraphResponsePayload {
|
|
|
328
328
|
text: string;
|
|
329
329
|
attachments?: IAttachment[];
|
|
330
330
|
reasoningChains?: IReasoningChain[];
|
|
331
|
+
contentChains?: IContentChain[];
|
|
331
332
|
metadata: {
|
|
332
333
|
usageMetrics: IUsageMetrics;
|
|
333
334
|
[key: string]: any;
|
|
@@ -1474,6 +1475,7 @@ declare class UniversalGraphService implements IGraphService {
|
|
|
1474
1475
|
attachments: any;
|
|
1475
1476
|
metadata: any;
|
|
1476
1477
|
reasoningChains: any;
|
|
1478
|
+
contentChains: any;
|
|
1477
1479
|
}>;
|
|
1478
1480
|
healthCheck(): Promise<boolean>;
|
|
1479
1481
|
cancelGeneration(requestId: string): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -1614,7 +1614,8 @@ var UniversalGraphService = class _UniversalGraphService {
|
|
|
1614
1614
|
text: result.text || "",
|
|
1615
1615
|
attachments: result.attachments || [],
|
|
1616
1616
|
metadata: result.metadata || {},
|
|
1617
|
-
reasoningChains: result.reasoningChains || []
|
|
1617
|
+
reasoningChains: result.reasoningChains || [],
|
|
1618
|
+
contentChains: result.contentChains
|
|
1618
1619
|
};
|
|
1619
1620
|
} finally {
|
|
1620
1621
|
this.unregisterActiveGeneration(payload.requestId);
|
|
@@ -1653,7 +1654,8 @@ var UniversalGraphService = class _UniversalGraphService {
|
|
|
1653
1654
|
text: result.text || "",
|
|
1654
1655
|
attachments: result.attachments || [],
|
|
1655
1656
|
metadata: result.metadata || {},
|
|
1656
|
-
reasoningChains: result.reasoningChains || []
|
|
1657
|
+
reasoningChains: result.reasoningChains || [],
|
|
1658
|
+
contentChains: result.contentChains
|
|
1657
1659
|
};
|
|
1658
1660
|
} catch (error) {
|
|
1659
1661
|
this.logger.error(`Error in streamAnswer: ${error.message}`);
|
|
@@ -7237,6 +7239,13 @@ var ModelInitializer = class _ModelInitializer {
|
|
|
7237
7239
|
modelName,
|
|
7238
7240
|
temperature: defaultTemperature,
|
|
7239
7241
|
maxTokens: defaultMaxTokens,
|
|
7242
|
+
// Stream tokens even under `.invoke()` so LangGraph `streamEvents`
|
|
7243
|
+
// emits `on_chat_model_stream`. Without it, nodes that call
|
|
7244
|
+
// `model.invoke()` (e.g. campaigns DefaultBehaviorNode) surface only
|
|
7245
|
+
// coarse `on_chain_*` events: no live SSE deltas, a sparse trace, and
|
|
7246
|
+
// a content chain collapsed into one text block (no tool_use
|
|
7247
|
+
// boundaries). Matches the Bedrock path, which already sets this.
|
|
7248
|
+
streaming: true,
|
|
7240
7249
|
anthropicApiKey: apiToken || this.resolveApiKey(ModelProvider.ANTHROPIC),
|
|
7241
7250
|
...routerURL && {
|
|
7242
7251
|
anthropicApiUrl: routerURL,
|