symposium 0.6.4 → 0.6.6

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/Agent.js CHANGED
@@ -87,11 +87,11 @@ export default class Agent {
87
87
  return null;
88
88
  }
89
89
 
90
- async message(thread, text) {
91
- await this.log('user_message', text);
92
- thread.addMessage('user', text);
90
+ async message(thread, content) {
91
+ await this.log('user_message', content);
92
+ thread.addMessage('user', content);
93
93
 
94
- await this.execute(thread, text);
94
+ await this.execute(thread);
95
95
  }
96
96
 
97
97
  async execute(thread) {
@@ -112,6 +112,24 @@ export default class AnthropicModel extends Model {
112
112
  tool_use_id: c.content.id,
113
113
  };
114
114
 
115
+ case 'image':
116
+ switch (c.content.type) {
117
+ case 'base64':
118
+ return {
119
+ type: 'image',
120
+ source: {
121
+ type: 'base64',
122
+ media_type: c.content.mime,
123
+ data: c.content.data,
124
+ },
125
+ };
126
+
127
+ // TODO: url
128
+
129
+ default:
130
+ throw new Error('Image source not supported');
131
+ }
132
+
115
133
  default:
116
134
  throw new Error('Message type "' + c.type + '" unsupported by this model');
117
135
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.6.4",
4
+ "version": "0.6.6",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",