symposium 0.14.0 → 0.14.2

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 CHANGED
@@ -259,6 +259,15 @@ export default class Agent {
259
259
  return i.output(thread, msg);
260
260
  }
261
261
 
262
+ async partial(thread, msg) {
263
+ if ((typeof msg) === 'text')
264
+ msg = {summary: msg};
265
+
266
+ const i = this.options.interfaces.find(i => i.name === thread.interface);
267
+ if (i)
268
+ return i.partial(thread, msg);
269
+ }
270
+
262
271
  parseFunctions(message) {
263
272
  const newContent = [];
264
273
  for (let m of message.content) {
@@ -371,11 +380,18 @@ export default class Agent {
371
380
  if (!functions.has(function_call.name))
372
381
  throw new Error('Unrecognized function ' + function_call.name);
373
382
 
383
+ const func = functions.get(function_call.name);
384
+ const partialOutput = func.partialOutput ? ((typeof func.partialOutput) === 'text' ? func.partialOutput : func.partialOutput.call(this, function_call.arguments)) : 'Uso lo strumento ' + function_call.name + '...';
385
+ this.partial(thread, partialOutput);
386
+
374
387
  await this.log('function_call', function_call);
375
388
 
376
389
  try {
377
- return await functions.get(function_call.name).tool.callFunction(thread, function_call.name, function_call.arguments);
390
+ const response = await func.tool.callFunction(thread, function_call.name, function_call.arguments);
391
+ this.partial(thread, 'Risposta ricevuta da ' + func.tool.name);
392
+ return response;
378
393
  } catch (error) {
394
+ this.partial(thread, 'Ricevuto errore da ' + func.tool.name);
379
395
  return {error};
380
396
  }
381
397
  }
package/Interface.js CHANGED
@@ -7,6 +7,9 @@ export default class Interface {
7
7
  static async output(thread, msg) {
8
8
  }
9
9
 
10
+ static async partial(thread, msg) {
11
+ }
12
+
10
13
  static async error(thread, error) {
11
14
  }
12
15
  }
package/Symposium.js CHANGED
@@ -102,7 +102,7 @@ export default class Symposium {
102
102
  break;
103
103
 
104
104
  case 'base64':
105
- file = new File([Buffer.from(audio.data, 'base64')], 'audio.' + this.getExtFromMime(audio.type), {type: audio.type});
105
+ file = new File([Buffer.from(audio.data, 'base64')], 'audio.' + this.getExtFromMime(audio.mime), {type: audio.mime});
106
106
  break;
107
107
  }
108
108
 
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.14.0",
4
+ "version": "0.14.2",
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.53.0",
11
- "groq-sdk": "^0.23.0",
10
+ "@anthropic-ai/sdk": "^0.55.0",
11
+ "groq-sdk": "^0.26.0",
12
12
  "openai": "^5.0.0",
13
13
  "tiktoken": "^1.0.10"
14
14
  }