modelfusion 0.58.0 → 0.59.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/README.md CHANGED
@@ -118,6 +118,7 @@ const textStream = await streamText(/* ... */);
118
118
 
119
119
  const speechStream = await streamSpeech(
120
120
  new ElevenLabsSpeechModel({
121
+ model: "eleven_turbo_v2",
121
122
  voice: "pNInz6obpgDQGcFmaJgB", // Adam
122
123
  optimizeStreamingLatency: 1,
123
124
  voiceSettings: { stability: 1, similarityBoost: 0.35 },
@@ -447,7 +448,7 @@ const retrievedTexts = await retrieve(
447
448
  );
448
449
  ```
449
450
 
450
- Available Vector Stores: [Memory](https://modelfusion.dev/integration/vector-index/memory), [Pinecone](https://modelfusion.dev/integration/vector-index/pinecone)
451
+ Available Vector Stores: [Memory](https://modelfusion.dev/integration/vector-index/memory), [SQLite VSS](https://modelfusion.dev/integration/vector-index/sqlite-vss), [Pinecone](https://modelfusion.dev/integration/vector-index/pinecone)
451
452
 
452
453
  ### Prompt Formats
453
454
 
@@ -14,6 +14,7 @@ const elevenLabsModels = [
14
14
  "eleven_multilingual_v2",
15
15
  "eleven_multilingual_v1",
16
16
  "eleven_monolingual_v1",
17
+ "eleven_turbo_v2",
17
18
  ];
18
19
  const defaultModel = "eleven_monolingual_v1";
19
20
  /**
@@ -4,7 +4,7 @@ import { ApiConfiguration } from "../../core/api/ApiConfiguration.js";
4
4
  import { AbstractModel } from "../../model-function/AbstractModel.js";
5
5
  import { Delta } from "../../model-function/Delta.js";
6
6
  import { StreamingSpeechGenerationModel, SpeechGenerationModelSettings } from "../../model-function/generate-speech/SpeechGenerationModel.js";
7
- declare const elevenLabsModels: readonly ["eleven_multilingual_v2", "eleven_multilingual_v1", "eleven_monolingual_v1"];
7
+ declare const elevenLabsModels: readonly ["eleven_multilingual_v2", "eleven_multilingual_v1", "eleven_monolingual_v1", "eleven_turbo_v2"];
8
8
  export interface ElevenLabsSpeechModelSettings extends SpeechGenerationModelSettings {
9
9
  api?: ApiConfiguration & {
10
10
  apiKey: string;
@@ -11,6 +11,7 @@ const elevenLabsModels = [
11
11
  "eleven_multilingual_v2",
12
12
  "eleven_multilingual_v1",
13
13
  "eleven_monolingual_v1",
14
+ "eleven_turbo_v2",
14
15
  ];
15
16
  const defaultModel = "eleven_monolingual_v1";
16
17
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modelfusion",
3
3
  "description": "Build multimodal applications, chatbots, and agents with JavaScript and TypeScript.",
4
- "version": "0.58.0",
4
+ "version": "0.59.0",
5
5
  "author": "Lars Grammel",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -13,5 +13,13 @@ class NoSuchToolError extends Error {
13
13
  this.name = "NoSuchToolError";
14
14
  this.toolName = toolName;
15
15
  }
16
+ toJSON() {
17
+ return {
18
+ name: this.name,
19
+ toolName: this.toolName,
20
+ message: this.message,
21
+ stack: this.stack,
22
+ };
23
+ }
16
24
  }
17
25
  exports.NoSuchToolError = NoSuchToolError;
@@ -1,4 +1,10 @@
1
1
  export declare class NoSuchToolError extends Error {
2
2
  readonly toolName: string;
3
3
  constructor(toolName: string);
4
+ toJSON(): {
5
+ name: string;
6
+ toolName: string;
7
+ message: string;
8
+ stack: string | undefined;
9
+ };
4
10
  }
@@ -10,4 +10,12 @@ export class NoSuchToolError extends Error {
10
10
  this.name = "NoSuchToolError";
11
11
  this.toolName = toolName;
12
12
  }
13
+ toJSON() {
14
+ return {
15
+ name: this.name,
16
+ toolName: this.toolName,
17
+ message: this.message,
18
+ stack: this.stack,
19
+ };
20
+ }
13
21
  }
@@ -27,5 +27,15 @@ class ToolExecutionError extends Error {
27
27
  this.input = input;
28
28
  this.cause = cause;
29
29
  }
30
+ toJSON() {
31
+ return {
32
+ name: this.name,
33
+ toolName: this.toolName,
34
+ input: this.input,
35
+ cause: this.cause,
36
+ message: this.message,
37
+ stack: this.stack,
38
+ };
39
+ }
30
40
  }
31
41
  exports.ToolExecutionError = ToolExecutionError;
@@ -8,4 +8,12 @@ export declare class ToolExecutionError extends Error {
8
8
  message: string | undefined;
9
9
  cause: unknown | undefined;
10
10
  });
11
+ toJSON(): {
12
+ name: string;
13
+ toolName: string;
14
+ input: unknown;
15
+ cause: unknown;
16
+ message: string;
17
+ stack: string | undefined;
18
+ };
11
19
  }
@@ -24,4 +24,14 @@ export class ToolExecutionError extends Error {
24
24
  this.input = input;
25
25
  this.cause = cause;
26
26
  }
27
+ toJSON() {
28
+ return {
29
+ name: this.name,
30
+ toolName: this.toolName,
31
+ input: this.input,
32
+ cause: this.cause,
33
+ message: this.message,
34
+ stack: this.stack,
35
+ };
36
+ }
27
37
  }
@@ -35,6 +35,7 @@ class JSONParseError extends Error {
35
35
  message: this.message,
36
36
  cause: this.cause,
37
37
  valueText: this.valueText,
38
+ stack: this.stack,
38
39
  };
39
40
  }
40
41
  }
@@ -11,5 +11,6 @@ export declare class JSONParseError extends Error {
11
11
  message: string;
12
12
  cause: unknown;
13
13
  valueText: string;
14
+ stack: string | undefined;
14
15
  };
15
16
  }
@@ -32,6 +32,7 @@ export class JSONParseError extends Error {
32
32
  message: this.message,
33
33
  cause: this.cause,
34
34
  valueText: this.valueText,
35
+ stack: this.stack,
35
36
  };
36
37
  }
37
38
  }