symposium 1.4.1 → 1.4.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.
Files changed (3) hide show
  1. package/Agent.js +2 -1
  2. package/Tool.js +3 -0
  3. package/package.json +1 -1
package/Agent.js CHANGED
@@ -65,12 +65,13 @@ export default class Agent {
65
65
  return {};
66
66
  }
67
67
 
68
- addTool(tool) {
68
+ async addTool(tool) {
69
69
  if (!(tool instanceof Tool) || !tool.name)
70
70
  throw new Error('Tool must be an instance of Tool class');
71
71
  if (this.tools.has(tool.name))
72
72
  throw new Error('Tool with name ' + tool.name + ' already exists in agent');
73
73
 
74
+ await tool.init(this);
74
75
  this.tools.set(tool.name, tool);
75
76
  }
76
77
 
package/Tool.js CHANGED
@@ -1,6 +1,9 @@
1
1
  export default class Tool {
2
2
  name = '';
3
3
 
4
+ async init(agent) {
5
+ }
6
+
4
7
  async getFunctions() {
5
8
  return [];
6
9
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "1.4.1",
4
+ "version": "1.4.2",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",