@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.js
CHANGED
|
@@ -4642,14 +4642,23 @@ var EventProcessor = class {
|
|
|
4642
4642
|
if (channel === "text" /* TEXT */) {
|
|
4643
4643
|
const output = event.data.output;
|
|
4644
4644
|
if (output?.answer) {
|
|
4645
|
-
acc.attachments =
|
|
4646
|
-
|
|
4645
|
+
acc.attachments = [
|
|
4646
|
+
...acc.attachments,
|
|
4647
|
+
...output.answer.attachments || []
|
|
4648
|
+
];
|
|
4649
|
+
acc.metadata = { ...acc.metadata, ...output.answer.metadata || {} };
|
|
4647
4650
|
} else if (output?.generation) {
|
|
4648
|
-
acc.attachments =
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
acc.metadata =
|
|
4651
|
+
acc.attachments = [
|
|
4652
|
+
...acc.attachments,
|
|
4653
|
+
...output.generation.attachments || []
|
|
4654
|
+
];
|
|
4655
|
+
acc.metadata = {
|
|
4656
|
+
...acc.metadata,
|
|
4657
|
+
...output.generation.metadata || {}
|
|
4658
|
+
};
|
|
4659
|
+
} else if (output?.attachments || output?.metadata) {
|
|
4660
|
+
acc.attachments = [...acc.attachments, ...output.attachments || []];
|
|
4661
|
+
acc.metadata = { ...acc.metadata, ...output.metadata || {} };
|
|
4653
4662
|
}
|
|
4654
4663
|
}
|
|
4655
4664
|
return;
|