ai 5.0.0-canary.10 → 5.0.0-canary.11
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/CHANGELOG.md +10 -0
- package/dist/index.d.mts +17 -10
- package/dist/index.d.ts +17 -10
- package/dist/index.js +375 -626
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +342 -593
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +7 -5
- package/dist/internal/index.d.ts +7 -5
- package/dist/internal/index.js +23 -15
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +23 -15
- package/dist/internal/index.mjs.map +1 -1
- package/dist/mcp-stdio/index.js +3 -3
- package/dist/mcp-stdio/index.js.map +1 -1
- package/dist/mcp-stdio/index.mjs +3 -3
- package/dist/mcp-stdio/index.mjs.map +1 -1
- package/dist/test/index.d.mts +3 -7
- package/dist/test/index.d.ts +3 -7
- package/dist/test/index.js +3 -7
- package/dist/test/index.js.map +1 -1
- package/dist/test/index.mjs +3 -7
- package/dist/test/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# ai
|
2
2
|
|
3
|
+
## 5.0.0-canary.11
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 8e64e9c: feat (ai): allow using provider default temperature by specifying null
|
8
|
+
- Updated dependencies [95857aa]
|
9
|
+
- Updated dependencies [7ea4132]
|
10
|
+
- @ai-sdk/provider@2.0.0-canary.8
|
11
|
+
- @ai-sdk/provider-utils@3.0.0-canary.9
|
12
|
+
|
3
13
|
## 5.0.0-canary.10
|
4
14
|
|
5
15
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
@@ -1216,10 +1216,11 @@ type CallSettings = {
|
|
1216
1216
|
1 (very random).
|
1217
1217
|
|
1218
1218
|
It is recommended to set either `temperature` or `topP`, but not both.
|
1219
|
+
Use `null` to use the provider's default temperature.
|
1219
1220
|
|
1220
1221
|
@default 0
|
1221
1222
|
*/
|
1222
|
-
temperature?: number;
|
1223
|
+
temperature?: number | null;
|
1223
1224
|
/**
|
1224
1225
|
Nucleus sampling. This is a number between 0 and 1.
|
1225
1226
|
|
@@ -2977,13 +2978,7 @@ interface GenerateTextResult<TOOLS extends ToolSet, OUTPUT> {
|
|
2977
2978
|
|
2978
2979
|
interface Output$1<OUTPUT, PARTIAL> {
|
2979
2980
|
readonly type: 'object' | 'text';
|
2980
|
-
|
2981
|
-
system: string | undefined;
|
2982
|
-
model: LanguageModel;
|
2983
|
-
}): string | undefined;
|
2984
|
-
responseFormat: (options: {
|
2985
|
-
model: LanguageModel;
|
2986
|
-
}) => LanguageModelV2CallOptions['responseFormat'];
|
2981
|
+
responseFormat: LanguageModelV2CallOptions['responseFormat'];
|
2987
2982
|
parsePartial(options: {
|
2988
2983
|
text: string;
|
2989
2984
|
}): {
|
@@ -4533,8 +4528,20 @@ declare function transcribe({ model, audio, providerOptions, maxRetries: maxRetr
|
|
4533
4528
|
* Applies default settings for a language model.
|
4534
4529
|
*/
|
4535
4530
|
declare function defaultSettingsMiddleware({ settings, }: {
|
4536
|
-
settings: Partial<
|
4537
|
-
|
4531
|
+
settings: Partial<{
|
4532
|
+
maxOutputTokens?: LanguageModelV2CallOptions['maxOutputTokens'] | null;
|
4533
|
+
temperature?: LanguageModelV2CallOptions['temperature'] | null;
|
4534
|
+
stopSequences?: LanguageModelV2CallOptions['stopSequences'] | null;
|
4535
|
+
topP?: LanguageModelV2CallOptions['topP'] | null;
|
4536
|
+
topK?: LanguageModelV2CallOptions['topK'] | null;
|
4537
|
+
presencePenalty?: LanguageModelV2CallOptions['presencePenalty'] | null;
|
4538
|
+
frequencyPenalty?: LanguageModelV2CallOptions['frequencyPenalty'] | null;
|
4539
|
+
responseFormat?: LanguageModelV2CallOptions['responseFormat'] | null;
|
4540
|
+
seed?: LanguageModelV2CallOptions['seed'] | null;
|
4541
|
+
tools?: LanguageModelV2CallOptions['tools'] | null;
|
4542
|
+
toolChoice?: LanguageModelV2CallOptions['toolChoice'] | null;
|
4543
|
+
headers?: LanguageModelV2CallOptions['headers'];
|
4544
|
+
providerOptions?: LanguageModelV2CallOptions['providerOptions'];
|
4538
4545
|
}>;
|
4539
4546
|
}): LanguageModelV2Middleware;
|
4540
4547
|
|
package/dist/index.d.ts
CHANGED
@@ -1216,10 +1216,11 @@ type CallSettings = {
|
|
1216
1216
|
1 (very random).
|
1217
1217
|
|
1218
1218
|
It is recommended to set either `temperature` or `topP`, but not both.
|
1219
|
+
Use `null` to use the provider's default temperature.
|
1219
1220
|
|
1220
1221
|
@default 0
|
1221
1222
|
*/
|
1222
|
-
temperature?: number;
|
1223
|
+
temperature?: number | null;
|
1223
1224
|
/**
|
1224
1225
|
Nucleus sampling. This is a number between 0 and 1.
|
1225
1226
|
|
@@ -2977,13 +2978,7 @@ interface GenerateTextResult<TOOLS extends ToolSet, OUTPUT> {
|
|
2977
2978
|
|
2978
2979
|
interface Output$1<OUTPUT, PARTIAL> {
|
2979
2980
|
readonly type: 'object' | 'text';
|
2980
|
-
|
2981
|
-
system: string | undefined;
|
2982
|
-
model: LanguageModel;
|
2983
|
-
}): string | undefined;
|
2984
|
-
responseFormat: (options: {
|
2985
|
-
model: LanguageModel;
|
2986
|
-
}) => LanguageModelV2CallOptions['responseFormat'];
|
2981
|
+
responseFormat: LanguageModelV2CallOptions['responseFormat'];
|
2987
2982
|
parsePartial(options: {
|
2988
2983
|
text: string;
|
2989
2984
|
}): {
|
@@ -4533,8 +4528,20 @@ declare function transcribe({ model, audio, providerOptions, maxRetries: maxRetr
|
|
4533
4528
|
* Applies default settings for a language model.
|
4534
4529
|
*/
|
4535
4530
|
declare function defaultSettingsMiddleware({ settings, }: {
|
4536
|
-
settings: Partial<
|
4537
|
-
|
4531
|
+
settings: Partial<{
|
4532
|
+
maxOutputTokens?: LanguageModelV2CallOptions['maxOutputTokens'] | null;
|
4533
|
+
temperature?: LanguageModelV2CallOptions['temperature'] | null;
|
4534
|
+
stopSequences?: LanguageModelV2CallOptions['stopSequences'] | null;
|
4535
|
+
topP?: LanguageModelV2CallOptions['topP'] | null;
|
4536
|
+
topK?: LanguageModelV2CallOptions['topK'] | null;
|
4537
|
+
presencePenalty?: LanguageModelV2CallOptions['presencePenalty'] | null;
|
4538
|
+
frequencyPenalty?: LanguageModelV2CallOptions['frequencyPenalty'] | null;
|
4539
|
+
responseFormat?: LanguageModelV2CallOptions['responseFormat'] | null;
|
4540
|
+
seed?: LanguageModelV2CallOptions['seed'] | null;
|
4541
|
+
tools?: LanguageModelV2CallOptions['tools'] | null;
|
4542
|
+
toolChoice?: LanguageModelV2CallOptions['toolChoice'] | null;
|
4543
|
+
headers?: LanguageModelV2CallOptions['headers'];
|
4544
|
+
providerOptions?: LanguageModelV2CallOptions['providerOptions'];
|
4538
4545
|
}>;
|
4539
4546
|
}): LanguageModelV2Middleware;
|
4540
4547
|
|