symposium 0.14.8 → 0.14.10

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 +4 -7
  2. package/package.json +4 -3
package/Agent.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import Symposium from "./Symposium.js";
2
2
  import Thread from "./Thread.js";
3
+ import {v7 as uuid} from 'uuid';
3
4
 
4
5
  export default class Agent {
5
6
  name = 'Agent';
@@ -415,18 +416,14 @@ export default class Agent {
415
416
 
416
417
  async createRealtimeSession(thread_id = null, interface_name = 'default') {
417
418
  // Se viene passato un thread esistente, lo si usa, altrimenti si crea un nuovo thread temporaneo
418
- const thread = new Thread(thread_id || 'temp', interface_name, this);
419
- if (thread_id === null) {
420
- await this.resetState(thread);
421
- await this.initThread(thread);
422
- }
419
+ const thread = await this.getThread(thread_id || uuid(), interface_name);
423
420
 
424
421
  const system_message = [], conversation = [];
425
422
  for (let message of thread.messages) {
426
423
  if (message.role === 'system')
427
424
  system_message.push(message.content.map(c => c.content).join("\n"));
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"));
425
+ else if (!message.tags?.includes('reasoning'))
426
+ conversation.push('[' + message.role + '] ' + message.content.map(c => (typeof c.content === 'string' ? c.content : (c.content.transcription || JSON.stringify(c.content)))).filter(c => !!c).join("\n"));
430
427
  }
431
428
 
432
429
  let instructions = system_message.join('\n');
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.14.8",
4
+ "version": "0.14.10",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",
8
8
  "license": "ISC",
9
9
  "dependencies": {
10
- "@anthropic-ai/sdk": "^0.55.0",
10
+ "@anthropic-ai/sdk": "^0.56.0",
11
11
  "groq-sdk": "^0.26.0",
12
12
  "openai": "^5.0.0",
13
- "tiktoken": "^1.0.10"
13
+ "tiktoken": "^1.0.10",
14
+ "uuid": "^11.1.0"
14
15
  }
15
16
  }