symposium 0.5.6 → 0.5.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.
@@ -4,7 +4,7 @@ import Message from "../Message.js";
4
4
 
5
5
  export default class AnthropicModel extends Model {
6
6
  anthropic;
7
- supports_functions = false;
7
+ supports_functions = true;
8
8
 
9
9
  getAnthropic() {
10
10
  if (!this.anthropic)
@@ -28,6 +28,12 @@ export default class AnthropicModel extends Model {
28
28
  system,
29
29
  max_tokens: 4096,
30
30
  messages,
31
+ tools: functions.map(f => ({
32
+ name: f.name,
33
+ description: f.description,
34
+ input_schema: f.parameters,
35
+ required: f.required || undefined,
36
+ })),
31
37
  ...payload,
32
38
  };
33
39
 
@@ -41,6 +47,16 @@ export default class AnthropicModel extends Model {
41
47
  message_content.push({type: 'text', content: m.text});
42
48
  break;
43
49
 
50
+ case 'tool_use':
51
+ message_content.push({
52
+ type: 'function',
53
+ content: {
54
+ name: m.name,
55
+ arguments: m.input,
56
+ },
57
+ });
58
+ break;
59
+
44
60
  default:
45
61
  throw new Error('Unrecognized message type in Anthropic response');
46
62
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.5.6",
4
+ "version": "0.5.7",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",
8
8
  "license": "ISC",
9
9
  "dependencies": {
10
- "@anthropic-ai/sdk": "^0.19.1",
10
+ "@anthropic-ai/sdk": "^0.20.0",
11
11
  "@travio/redis": "^2.0.0",
12
12
  "openai": "^4.12.1",
13
13
  "tiktoken": "^1.0.10"