symposium 0.14.20 → 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.
- package/Agent.js +9 -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 => ({
|
|
@@ -447,6 +453,7 @@ export default class Agent {
|
|
|
447
453
|
tools,
|
|
448
454
|
input_audio_transcription: {
|
|
449
455
|
model: 'gpt-4o-transcribe',
|
|
456
|
+
language: options.language,
|
|
450
457
|
},
|
|
451
458
|
}),
|
|
452
459
|
}).then(response => response.json());
|