symposium 0.6.9 → 0.7.0

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
@@ -188,7 +188,8 @@ export default class Agent {
188
188
  break;
189
189
 
190
190
  case 'function':
191
- functions.push(m.content);
191
+ for (let f of m.content)
192
+ functions.push(f);
192
193
  break;
193
194
  }
194
195
  }
package/Symposium.js CHANGED
@@ -39,8 +39,12 @@ export default class Symposium {
39
39
  const functions = [];
40
40
  for (let message of messages) {
41
41
  const functionResponse = message.content.filter(c => c.type === 'function');
42
- if (functionResponse.length)
43
- functions.push(functionResponse[0].content.arguments)
42
+ if (functionResponse.length) {
43
+ for (let f of functionResponse) {
44
+ for (let r of f.content)
45
+ functions.push(r.arguments);
46
+ }
47
+ }
44
48
  }
45
49
 
46
50
  return functions;
@@ -1,7 +1,7 @@
1
1
  import OpenAIModel from "./OpenAIModel.js";
2
2
 
3
3
  export default class Gpt4Turbo extends OpenAIModel {
4
- name = 'gpt-4-turbo-preview';
4
+ name = 'gpt-4-turbo';
5
5
  label = 'gpt-4-turbo';
6
6
  name_for_tiktoken = 'gpt-4';
7
7
  tokens = 128000;
@@ -118,6 +118,21 @@ export default class OpenAIModel extends Model {
118
118
  });
119
119
  break;
120
120
 
121
+ case 'image':
122
+ messages.push({
123
+ role: message.role,
124
+ content: [
125
+ {
126
+ type: 'image_url',
127
+ image_url: {
128
+ urL: c.content.type === 'base64' ? 'data:' + c.content.mime + ';base64,' + c.content.data : c.content.data,
129
+ },
130
+ },
131
+ ],
132
+ name: message.name,
133
+ });
134
+ break;
135
+
121
136
  case 'function':
122
137
  if (this.supports_functions) {
123
138
  messages.push({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.6.9",
4
+ "version": "0.7.0",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",