symposium 0.3.0 → 0.3.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
@@ -23,10 +23,6 @@ export default class Agent {
23
23
  this.threads = new Map();
24
24
  }
25
25
 
26
- async logout(thread) {
27
- thread.auth = new Map();
28
- }
29
-
30
26
  async reset(thread) {
31
27
  await thread.flush();
32
28
  await this.resetState(thread);
package/Symposium.js CHANGED
@@ -35,13 +35,13 @@ export default class Symposium {
35
35
  }
36
36
 
37
37
  static async transcribe(agent, file, thread) {
38
- let words = await agent.getPromptWordsForTranscription(thread);
38
+ const words = await agent.getPromptWordsForTranscription(thread);
39
39
 
40
- let response = await this.openai.audio.transcriptions.create({
40
+ const response = await this.getOpenAi().then(openai => openai.audio.transcriptions.create({
41
41
  file,
42
42
  model: 'whisper-1',
43
43
  prompt: words.join(', '),
44
- });
44
+ }));
45
45
  return response.text;
46
46
  }
47
47
  }
package/Thread.js CHANGED
@@ -6,7 +6,6 @@ export default class Thread {
6
6
  reply;
7
7
  messages = [];
8
8
  state = {};
9
- auth = new Map();
10
9
 
11
10
  constructor(id) {
12
11
  this.id = id;
@@ -31,7 +30,6 @@ export default class Thread {
31
30
 
32
31
  const conv = await Redis.get('thread-' + this.id);
33
32
  if (conv) {
34
- this.auth = new Map(conv.auth || []);
35
33
  this.state = conv.state || {};
36
34
  this.messages = conv.messages.map(m => (new Message(m.role, m.text, m.name, m.function_call, m.tags || [])));
37
35
  return true;
@@ -48,7 +46,6 @@ export default class Thread {
48
46
 
49
47
  async storeState() {
50
48
  await Redis.set('thread-' + this.id, {
51
- auth: [...this.auth.entries()],
52
49
  state: this.state,
53
50
  messages: this.messages,
54
51
  }, 0);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "symposium",
4
- "version": "0.3.0",
4
+ "version": "0.3.2",
5
5
  "description": "Agents",
6
6
  "main": "index.js",
7
7
  "author": "Domenico Giambra",