backend-manager 3.2.104 → 3.2.105
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/package.json
CHANGED
|
@@ -253,9 +253,18 @@ OpenAI.prototype.request = function (options) {
|
|
|
253
253
|
// Format history
|
|
254
254
|
history.map((m) => {
|
|
255
255
|
m.role = m.role || 'system';
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
|
|
257
|
+
m.content = [];
|
|
258
|
+
|
|
259
|
+
// Set content
|
|
260
|
+
if (m.text) {
|
|
261
|
+
m.content.push({
|
|
262
|
+
type: 'text',
|
|
263
|
+
text: m.text,
|
|
264
|
+
})
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Set images
|
|
259
268
|
m.images = m.images || [];
|
|
260
269
|
|
|
261
270
|
// Loop through and add
|
|
@@ -277,7 +286,9 @@ OpenAI.prototype.request = function (options) {
|
|
|
277
286
|
})
|
|
278
287
|
|
|
279
288
|
// Log message
|
|
280
|
-
|
|
289
|
+
history.forEach((m) => {
|
|
290
|
+
_log('Message', m.role, m.content);
|
|
291
|
+
});
|
|
281
292
|
|
|
282
293
|
request.body = {
|
|
283
294
|
model: options.model,
|