@sprucelabs/sprucebot-llm 13.2.2 → 13.2.3

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.
@@ -46,7 +46,7 @@ class AnthropicAdapter {
46
46
  type: this.isThinkingEnabled ? 'adaptive' : 'disabled',
47
47
  },
48
48
  }, sendOptions);
49
- const text = response.content?.[0]?.text;
49
+ const text = response.content.find((block) => block.type === 'text')?.text;
50
50
  return text;
51
51
  }
52
52
  setModel(model) {
@@ -33,7 +33,7 @@ class AnthropicAdapter {
33
33
  }
34
34
  sendHandler(params, sendOptions) {
35
35
  return __awaiter(this, void 0, void 0, function* () {
36
- var _a, _b;
36
+ var _a;
37
37
  const { messages: openAiMessages, model } = params;
38
38
  const messages = [];
39
39
  for (const msg of openAiMessages) {
@@ -50,7 +50,7 @@ class AnthropicAdapter {
50
50
  type: this.isThinkingEnabled ? 'adaptive' : 'disabled',
51
51
  },
52
52
  }, sendOptions);
53
- const text = (_b = (_a = response.content) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.text;
53
+ const text = (_a = response.content.find((block) => block.type === 'text')) === null || _a === void 0 ? void 0 : _a.text;
54
54
  return text;
55
55
  });
56
56
  }
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "eta"
9
9
  ]
10
10
  },
11
- "version": "13.2.2",
11
+ "version": "13.2.3",
12
12
  "files": [
13
13
  "build"
14
14
  ],