@flutchai/flutch-sdk 0.1.12 → 0.1.13
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 +16 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4671,14 +4671,23 @@ exports.EventProcessor = class EventProcessor {
|
|
|
4671
4671
|
if (channel === "text" /* TEXT */) {
|
|
4672
4672
|
const output = event.data.output;
|
|
4673
4673
|
if (output?.answer) {
|
|
4674
|
-
acc.attachments =
|
|
4675
|
-
|
|
4674
|
+
acc.attachments = [
|
|
4675
|
+
...acc.attachments,
|
|
4676
|
+
...output.answer.attachments || []
|
|
4677
|
+
];
|
|
4678
|
+
acc.metadata = { ...acc.metadata, ...output.answer.metadata || {} };
|
|
4676
4679
|
} else if (output?.generation) {
|
|
4677
|
-
acc.attachments =
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
acc.metadata =
|
|
4680
|
+
acc.attachments = [
|
|
4681
|
+
...acc.attachments,
|
|
4682
|
+
...output.generation.attachments || []
|
|
4683
|
+
];
|
|
4684
|
+
acc.metadata = {
|
|
4685
|
+
...acc.metadata,
|
|
4686
|
+
...output.generation.metadata || {}
|
|
4687
|
+
};
|
|
4688
|
+
} else if (output?.attachments || output?.metadata) {
|
|
4689
|
+
acc.attachments = [...acc.attachments, ...output.attachments || []];
|
|
4690
|
+
acc.metadata = { ...acc.metadata, ...output.metadata || {} };
|
|
4682
4691
|
}
|
|
4683
4692
|
}
|
|
4684
4693
|
return;
|