symposium 1.2.3 → 1.2.4
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/models/AnthropicModel.js +21 -2
- package/models/Claude45Sonnet.js +7 -0
- package/package.json +1 -1
package/models/AnthropicModel.js
CHANGED
|
@@ -30,7 +30,12 @@ export default class AnthropicModel extends Model {
|
|
|
30
30
|
const completion_payload = {
|
|
31
31
|
model: this.name,
|
|
32
32
|
system,
|
|
33
|
-
max_tokens:
|
|
33
|
+
max_tokens: 16000,
|
|
34
|
+
thinking: {
|
|
35
|
+
type: "enabled",
|
|
36
|
+
budget_tokens: 10000,
|
|
37
|
+
},
|
|
38
|
+
betas: ["interleaved-thinking-2025-05-14"],
|
|
34
39
|
messages,
|
|
35
40
|
tools: functions.map(f => ({
|
|
36
41
|
name: f.name,
|
|
@@ -47,7 +52,7 @@ export default class AnthropicModel extends Model {
|
|
|
47
52
|
};
|
|
48
53
|
}
|
|
49
54
|
|
|
50
|
-
const message = await this.getAnthropic().messages.create(completion_payload);
|
|
55
|
+
const message = await this.getAnthropic().beta.messages.create(completion_payload);
|
|
51
56
|
|
|
52
57
|
const message_content = [];
|
|
53
58
|
if (message.content) {
|
|
@@ -70,6 +75,13 @@ export default class AnthropicModel extends Model {
|
|
|
70
75
|
});
|
|
71
76
|
break;
|
|
72
77
|
|
|
78
|
+
case 'thinking':
|
|
79
|
+
message_content.push({
|
|
80
|
+
type: 'reasoning',
|
|
81
|
+
content: message,
|
|
82
|
+
});
|
|
83
|
+
break;
|
|
84
|
+
|
|
73
85
|
default:
|
|
74
86
|
throw new Error('Unrecognized message type in Anthropic response');
|
|
75
87
|
}
|
|
@@ -159,6 +171,13 @@ export default class AnthropicModel extends Model {
|
|
|
159
171
|
}
|
|
160
172
|
break;
|
|
161
173
|
|
|
174
|
+
case 'reasoning':
|
|
175
|
+
content.push({
|
|
176
|
+
...c,
|
|
177
|
+
type: 'thinking',
|
|
178
|
+
});
|
|
179
|
+
break;
|
|
180
|
+
|
|
162
181
|
default:
|
|
163
182
|
throw new Error('Message type "' + c.type + '" unsupported by this model');
|
|
164
183
|
}
|