symposium 2.3.2 → 2.3.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/OpenAIModel.js +9 -4
- package/package.json +1 -1
package/Models/OpenAIModel.js
CHANGED
|
@@ -188,7 +188,7 @@ export default class OpenAIModel extends Model {
|
|
|
188
188
|
break;
|
|
189
189
|
|
|
190
190
|
case 'image':
|
|
191
|
-
if (c.meta
|
|
191
|
+
if (c.meta?.id) { // From model image generation
|
|
192
192
|
let base64;
|
|
193
193
|
if (c.content.type === 'base64') {
|
|
194
194
|
base64 = c.content.data;
|
|
@@ -207,9 +207,14 @@ export default class OpenAIModel extends Model {
|
|
|
207
207
|
});
|
|
208
208
|
} else {
|
|
209
209
|
messages.push({
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
role,
|
|
211
|
+
content: [
|
|
212
|
+
{
|
|
213
|
+
type: 'input_image',
|
|
214
|
+
image_url: c.content.type === 'base64' ? 'data:' + c.content.mime + ';base64,' + c.content.data : c.content.data,
|
|
215
|
+
detail: c.content.detail || 'auto',
|
|
216
|
+
},
|
|
217
|
+
],
|
|
213
218
|
});
|
|
214
219
|
}
|
|
215
220
|
break;
|