symposium 0.6.3 → 0.6.5

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) {
@@ -108,10 +108,25 @@ export default class AnthropicModel extends Model {
108
108
  case 'function_response':
109
109
  return {
110
110
  type: 'tool_result',
111
- content: c.content.response,
111
+ content: JSON.stringify(c.content.response),
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
+ media_type: c.content.mime,
121
+ data: c.content.data,
122
+ };
123
+
124
+ // TODO: url
125
+
126
+ default:
127
+ throw new Error('Image source not supported');
128
+ }
129
+
115
130
  default:
116
131
  throw new Error('Message type "' + c.type + '" unsupported by this model');
117
132
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.6.3",
4
+ "version": "0.6.5",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",