symposium 0.14.19 → 0.14.21

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 +12 -2
  2. package/package.json +1 -1
package/Agent.js CHANGED
@@ -414,7 +414,13 @@ export default class Agent {
414
414
  return [this.name];
415
415
  }
416
416
 
417
- async createRealtimeSession(thread_id = null, interface_name = 'default') {
417
+ async createRealtimeSession(thread_id = null, interface_name = 'default', options = {}) {
418
+ options = {
419
+ include_thread: true,
420
+ language: 'it',
421
+ ...options,
422
+ };
423
+
418
424
  // Se viene passato un thread esistente, lo si usa, altrimenti si crea un nuovo thread temporaneo
419
425
  const thread = await this.getThread(thread_id || uuid(), interface_name);
420
426
 
@@ -427,7 +433,7 @@ export default class Agent {
427
433
  }
428
434
 
429
435
  let instructions = system_message.join('\n');
430
- if (conversation.length)
436
+ if (conversation.length && options.include_thread)
431
437
  instructions += '\n\n# Ecco la tua conversazione fino ad ora: #\n' + conversation.join('\n');
432
438
 
433
439
  const tools = (await this.getFunctions()).map(t => ({
@@ -445,6 +451,10 @@ export default class Agent {
445
451
  model: 'gpt-realtime',
446
452
  instructions,
447
453
  tools,
454
+ input_audio_transcription: {
455
+ model: 'gpt-4o-transcribe',
456
+ language: options.language,
457
+ },
448
458
  }),
449
459
  }).then(response => response.json());
450
460
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.14.19",
4
+ "version": "0.14.21",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",