@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.mjs
CHANGED
|
@@ -424,7 +424,7 @@ var webSearchPreview = createProviderDefinedToolFactory2({
|
|
|
424
424
|
action: z4.discriminatedUnion("type", [
|
|
425
425
|
z4.object({
|
|
426
426
|
type: z4.literal("search"),
|
|
427
|
-
query: z4.string()
|
|
427
|
+
query: z4.string().nullish()
|
|
428
428
|
}),
|
|
429
429
|
z4.object({
|
|
430
430
|
type: z4.literal("open_page"),
|
|
@@ -1938,8 +1938,12 @@ var OpenAITranscriptionModel = class {
|
|
|
1938
1938
|
include: openAIOptions.include,
|
|
1939
1939
|
language: openAIOptions.language,
|
|
1940
1940
|
prompt: openAIOptions.prompt,
|
|
1941
|
-
response_format
|
|
1942
|
-
//
|
|
1941
|
+
// https://platform.openai.com/docs/api-reference/audio/createTranscription#audio_createtranscription-response_format
|
|
1942
|
+
// prefer verbose_json to get segments for models that support it
|
|
1943
|
+
response_format: [
|
|
1944
|
+
"gpt-4o-transcribe",
|
|
1945
|
+
"gpt-4o-mini-transcribe"
|
|
1946
|
+
].includes(this.modelId) ? "json" : "verbose_json",
|
|
1943
1947
|
temperature: openAIOptions.temperature,
|
|
1944
1948
|
timestamp_granularities: openAIOptions.timestampGranularities
|
|
1945
1949
|
};
|
|
@@ -2490,7 +2494,7 @@ var webSearchCallItem = z16.object({
|
|
|
2490
2494
|
action: z16.discriminatedUnion("type", [
|
|
2491
2495
|
z16.object({
|
|
2492
2496
|
type: z16.literal("search"),
|
|
2493
|
-
query: z16.string()
|
|
2497
|
+
query: z16.string().nullish()
|
|
2494
2498
|
}),
|
|
2495
2499
|
z16.object({
|
|
2496
2500
|
type: z16.literal("open_page"),
|