modality-kit 0.14.6 → 0.14.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.
Files changed (2) hide show
  1. package/dist/index.js +12 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -41,15 +41,19 @@ function formatSuccessResponse(successData, meta) {
41
41
  const { instructions, content: dataContent, ...restData } = data;
42
42
  const result = {
43
43
  isError: false,
44
- structuredContent: {
45
- instructions,
46
- meta,
47
- ...restData
48
- },
49
- content: []
44
+ content: [
45
+ {
46
+ type: "text",
47
+ text: JSON.stringify({
48
+ instructions,
49
+ meta,
50
+ ...restData
51
+ })
52
+ }
53
+ ]
50
54
  };
51
55
  if (Array.isArray(dataContent)) {
52
- result.content = dataContent.map((item) => {
56
+ result.content.push(...dataContent.map((item) => {
53
57
  if (typeof item === "string") {
54
58
  return { type: "text", text: item };
55
59
  } else if (item.type && ContentType.includes(item.type)) {
@@ -57,7 +61,7 @@ function formatSuccessResponse(successData, meta) {
57
61
  } else {
58
62
  return { type: "text", text: JSON.stringify(item) };
59
63
  }
60
- });
64
+ }));
61
65
  }
62
66
  return result;
63
67
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.14.6",
2
+ "version": "0.14.7",
3
3
  "name": "modality-kit",
4
4
  "repository": {
5
5
  "type": "git",