@ai-sdk/openai 2.0.20 → 2.0.21
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 +13 -0
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +8 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +8 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/internal/index.js
CHANGED
|
@@ -448,7 +448,7 @@ var webSearchPreview = (0, import_provider_utils4.createProviderDefinedToolFacto
|
|
|
448
448
|
action: import_v44.z.discriminatedUnion("type", [
|
|
449
449
|
import_v44.z.object({
|
|
450
450
|
type: import_v44.z.literal("search"),
|
|
451
|
-
query: import_v44.z.string()
|
|
451
|
+
query: import_v44.z.string().nullish()
|
|
452
452
|
}),
|
|
453
453
|
import_v44.z.object({
|
|
454
454
|
type: import_v44.z.literal("open_page"),
|
|
@@ -1936,8 +1936,12 @@ var OpenAITranscriptionModel = class {
|
|
|
1936
1936
|
include: openAIOptions.include,
|
|
1937
1937
|
language: openAIOptions.language,
|
|
1938
1938
|
prompt: openAIOptions.prompt,
|
|
1939
|
-
response_format
|
|
1940
|
-
//
|
|
1939
|
+
// https://platform.openai.com/docs/api-reference/audio/createTranscription#audio_createtranscription-response_format
|
|
1940
|
+
// prefer verbose_json to get segments for models that support it
|
|
1941
|
+
response_format: [
|
|
1942
|
+
"gpt-4o-transcribe",
|
|
1943
|
+
"gpt-4o-mini-transcribe"
|
|
1944
|
+
].includes(this.modelId) ? "json" : "verbose_json",
|
|
1941
1945
|
temperature: openAIOptions.temperature,
|
|
1942
1946
|
timestamp_granularities: openAIOptions.timestampGranularities
|
|
1943
1947
|
};
|
|
@@ -2470,7 +2474,7 @@ var webSearchCallItem = import_v416.z.object({
|
|
|
2470
2474
|
action: import_v416.z.discriminatedUnion("type", [
|
|
2471
2475
|
import_v416.z.object({
|
|
2472
2476
|
type: import_v416.z.literal("search"),
|
|
2473
|
-
query: import_v416.z.string()
|
|
2477
|
+
query: import_v416.z.string().nullish()
|
|
2474
2478
|
}),
|
|
2475
2479
|
import_v416.z.object({
|
|
2476
2480
|
type: import_v416.z.literal("open_page"),
|