symposium 0.14.7 → 0.14.8

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.
Files changed (2) hide show
  1. package/Agent.js +5 -5
  2. package/package.json +1 -1
package/Agent.js CHANGED
@@ -421,17 +421,17 @@ export default class Agent {
421
421
  await this.initThread(thread);
422
422
  }
423
423
 
424
- let system_message = '', conversation = [];
424
+ const system_message = [], conversation = [];
425
425
  for (let message of thread.messages) {
426
426
  if (message.role === 'system')
427
- system_message += message.content.map(c => c.content).join("\n") + "\n";
427
+ system_message.push(message.content.map(c => c.content).join("\n"));
428
428
  else
429
- conversation.push(message.role + ': ' + message.content.map(c => (typeof c.content === 'string' ? c.content : (c.content.transcription || null))).filter(c => !!c).join("\n"));
429
+ conversation.push('[' + message.role + '] ' + message.content.map(c => (typeof c.content === 'string' ? c.content : (c.content.transcription || null))).filter(c => !!c).join("\n"));
430
430
  }
431
431
 
432
- let instructions = system_message.trim();
432
+ let instructions = system_message.join('\n');
433
433
  if (conversation.length)
434
- instructions += '\n\nPrevious conversation:\n-------------------\n' + conversation.join('\n\n');
434
+ instructions += '\n\n# Ecco la tua conversazione fino ad ora: #\n' + conversation.join('\n');
435
435
 
436
436
  const tools = (await this.getFunctions()).map(t => ({
437
437
  type: 'function',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.14.7",
4
+ "version": "0.14.8",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",