symposium 2.2.0 → 2.2.2

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.
@@ -114,6 +114,24 @@ export default class OpenAIModel extends Model {
114
114
  message_content.push({type: 'text', content: text});
115
115
  break;
116
116
 
117
+ case 'image_generation_call':
118
+ const mime = output.output_format === 'png' ? 'image/png' : 'image/jpeg';
119
+ message_content.push({
120
+ type: 'image',
121
+ source: {
122
+ type: 'base64',
123
+ media_type: mime,
124
+ data: output.result,
125
+ },
126
+ meta: {
127
+ id: output.id,
128
+ status: output.status,
129
+ prompt: output.revised_prompt,
130
+ size: output.size,
131
+ },
132
+ });
133
+ break;
134
+
117
135
  case 'function_call':
118
136
  message_content.push({
119
137
  type: 'function',
@@ -170,17 +188,15 @@ export default class OpenAIModel extends Model {
170
188
  break;
171
189
 
172
190
  case 'image':
173
- messages.push({
174
- role,
175
- content: [
176
- {
177
- type: 'image_url',
178
- image_url: {
179
- url: c.content.type === 'base64' ? 'data:' + c.content.mime + ';base64,' + c.content.data : c.content.data,
180
- detail: c.content.detail || 'auto',
181
- },
182
- },
183
- ],
191
+ messages.push(c.meta.id ? {
192
+ type: 'image_generation_call',
193
+ id: c.meta.id,
194
+ result: c.source.data,
195
+ status: c.meta.status,
196
+ } : {
197
+ type: 'input_image',
198
+ image_url: c.content.type === 'base64' ? 'data:' + c.content.mime + ';base64,' + c.content.data : c.content.data,
199
+ detail: c.content.detail || 'auto',
184
200
  });
185
201
  break;
186
202
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "2.2.0",
4
+ "version": "2.2.2",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",