@ai-sdk/openai 4.0.0-beta.40 → 4.0.0-beta.41
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 +12 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +176 -118
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +2 -2
- package/dist/internal/index.js +162 -107
- package/dist/internal/index.js.map +1 -1
- package/docs/03-openai.mdx +18 -13
- package/package.json +4 -4
- package/src/chat/convert-openai-chat-usage.ts +1 -1
- package/src/chat/convert-to-openai-chat-messages.ts +85 -72
- package/src/chat/map-openai-finish-reason.ts +1 -1
- package/src/chat/openai-chat-api.ts +6 -2
- package/src/chat/openai-chat-language-model.ts +6 -6
- package/src/chat/openai-chat-options.ts +5 -1
- package/src/chat/openai-chat-prepare-tools.ts +3 -3
- package/src/completion/convert-openai-completion-usage.ts +1 -1
- package/src/completion/convert-to-openai-completion-prompt.ts +1 -2
- package/src/completion/map-openai-finish-reason.ts +1 -1
- package/src/completion/openai-completion-api.ts +5 -2
- package/src/completion/openai-completion-language-model.ts +6 -7
- package/src/completion/openai-completion-options.ts +5 -1
- package/src/embedding/openai-embedding-model.ts +3 -3
- package/src/embedding/openai-embedding-options.ts +5 -1
- package/src/files/openai-files-options.ts +5 -1
- package/src/files/openai-files.ts +5 -7
- package/src/image/openai-image-model.ts +3 -4
- package/src/openai-config.ts +1 -1
- package/src/openai-provider.ts +9 -9
- package/src/responses/convert-openai-responses-usage.ts +1 -1
- package/src/responses/convert-to-openai-responses-input.ts +72 -60
- package/src/responses/map-openai-responses-finish-reason.ts +1 -1
- package/src/responses/openai-responses-api.ts +6 -2
- package/src/responses/openai-responses-language-model.ts +35 -35
- package/src/responses/openai-responses-options.ts +5 -1
- package/src/responses/openai-responses-prepare-tools.ts +5 -5
- package/src/responses/openai-responses-provider-metadata.ts +2 -2
- package/src/skills/openai-skills.ts +4 -8
- package/src/speech/openai-speech-model.ts +4 -5
- package/src/speech/openai-speech-options.ts +5 -1
- package/src/tool/file-search.ts +1 -1
- package/src/tool/mcp.ts +1 -1
- package/src/tool/tool-search.ts +2 -2
- package/src/transcription/openai-transcription-model.ts +4 -5
- package/src/transcription/openai-transcription-options.ts +5 -1
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
LanguageModelV4Prompt,
|
|
3
|
-
LanguageModelV4ToolApprovalResponsePart,
|
|
4
|
-
SharedV4Warning,
|
|
5
2
|
UnsupportedFunctionalityError,
|
|
3
|
+
type LanguageModelV4Prompt,
|
|
4
|
+
type LanguageModelV4ToolApprovalResponsePart,
|
|
5
|
+
type SharedV4Warning,
|
|
6
6
|
} from '@ai-sdk/provider';
|
|
7
7
|
import {
|
|
8
8
|
convertToBase64,
|
|
9
|
+
getTopLevelMediaType,
|
|
9
10
|
isNonNullable,
|
|
10
|
-
isProviderReference,
|
|
11
11
|
parseJSON,
|
|
12
12
|
parseProviderOptions,
|
|
13
|
+
resolveFullMediaType,
|
|
13
14
|
resolveProviderReference,
|
|
14
|
-
ToolNameMapping,
|
|
15
15
|
validateTypes,
|
|
16
|
+
type ToolNameMapping,
|
|
16
17
|
} from '@ai-sdk/provider-utils';
|
|
17
18
|
import { z } from 'zod/v4';
|
|
18
19
|
import {
|
|
@@ -24,7 +25,7 @@ import {
|
|
|
24
25
|
localShellOutputSchema,
|
|
25
26
|
} from '../tool/local-shell';
|
|
26
27
|
import { shellInputSchema, shellOutputSchema } from '../tool/shell';
|
|
27
|
-
import {
|
|
28
|
+
import type {
|
|
28
29
|
OpenAIResponsesCompactionItem,
|
|
29
30
|
OpenAIResponsesCustomToolCallOutput,
|
|
30
31
|
OpenAIResponsesFunctionCallOutput,
|
|
@@ -122,68 +123,79 @@ export async function convertToOpenAIResponsesInput({
|
|
|
122
123
|
return { type: 'input_text', text: part.text };
|
|
123
124
|
}
|
|
124
125
|
case 'file': {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
switch (part.data.type) {
|
|
127
|
+
case 'reference': {
|
|
128
|
+
const fileId = resolveProviderReference({
|
|
129
|
+
reference: part.data.reference,
|
|
130
|
+
provider: providerOptionsName,
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
if (getTopLevelMediaType(part.mediaType) === 'image') {
|
|
134
|
+
return {
|
|
135
|
+
type: 'input_image',
|
|
136
|
+
file_id: fileId,
|
|
137
|
+
detail:
|
|
138
|
+
part.providerOptions?.[providerOptionsName]
|
|
139
|
+
?.imageDetail,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
130
142
|
|
|
131
|
-
if (part.mediaType.startsWith('image/')) {
|
|
132
143
|
return {
|
|
133
|
-
type: '
|
|
144
|
+
type: 'input_file',
|
|
134
145
|
file_id: fileId,
|
|
135
|
-
detail:
|
|
136
|
-
part.providerOptions?.[providerOptionsName]
|
|
137
|
-
?.imageDetail,
|
|
138
146
|
};
|
|
139
147
|
}
|
|
148
|
+
case 'text': {
|
|
149
|
+
throw new UnsupportedFunctionalityError({
|
|
150
|
+
functionality: 'text file parts',
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
case 'url':
|
|
154
|
+
case 'data': {
|
|
155
|
+
const topLevel = getTopLevelMediaType(part.mediaType);
|
|
140
156
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
157
|
+
if (topLevel === 'image') {
|
|
158
|
+
return {
|
|
159
|
+
type: 'input_image',
|
|
160
|
+
...(part.data.type === 'url'
|
|
161
|
+
? { image_url: part.data.url.toString() }
|
|
162
|
+
: typeof part.data.data === 'string' &&
|
|
163
|
+
isFileId(part.data.data, fileIdPrefixes)
|
|
164
|
+
? { file_id: part.data.data }
|
|
165
|
+
: {
|
|
166
|
+
image_url: `data:${resolveFullMediaType({ part })};base64,${convertToBase64(part.data.data)}`,
|
|
167
|
+
}),
|
|
168
|
+
detail:
|
|
169
|
+
part.providerOptions?.[providerOptionsName]
|
|
170
|
+
?.imageDetail,
|
|
171
|
+
};
|
|
172
|
+
} else {
|
|
173
|
+
if (part.data.type === 'url') {
|
|
174
|
+
return {
|
|
175
|
+
type: 'input_file',
|
|
176
|
+
file_url: part.data.url.toString(),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
146
179
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
};
|
|
166
|
-
} else if (part.mediaType === 'application/pdf') {
|
|
167
|
-
if (part.data instanceof URL) {
|
|
168
|
-
return {
|
|
169
|
-
type: 'input_file',
|
|
170
|
-
file_url: part.data.toString(),
|
|
171
|
-
};
|
|
180
|
+
const fullMediaType = resolveFullMediaType({ part });
|
|
181
|
+
if (fullMediaType !== 'application/pdf') {
|
|
182
|
+
throw new UnsupportedFunctionalityError({
|
|
183
|
+
functionality: `file part media type ${fullMediaType}`,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return {
|
|
188
|
+
type: 'input_file',
|
|
189
|
+
...(typeof part.data.data === 'string' &&
|
|
190
|
+
isFileId(part.data.data, fileIdPrefixes)
|
|
191
|
+
? { file_id: part.data.data }
|
|
192
|
+
: {
|
|
193
|
+
filename: part.filename ?? `part-${index}.pdf`,
|
|
194
|
+
file_data: `data:application/pdf;base64,${convertToBase64(part.data.data)}`,
|
|
195
|
+
}),
|
|
196
|
+
};
|
|
197
|
+
}
|
|
172
198
|
}
|
|
173
|
-
return {
|
|
174
|
-
type: 'input_file',
|
|
175
|
-
...(typeof part.data === 'string' &&
|
|
176
|
-
isFileId(part.data, fileIdPrefixes)
|
|
177
|
-
? { file_id: part.data }
|
|
178
|
-
: {
|
|
179
|
-
filename: part.filename ?? `part-${index}.pdf`,
|
|
180
|
-
file_data: `data:application/pdf;base64,${convertToBase64(part.data)}`,
|
|
181
|
-
}),
|
|
182
|
-
};
|
|
183
|
-
} else {
|
|
184
|
-
throw new UnsupportedFunctionalityError({
|
|
185
|
-
functionality: `file part media type ${part.mediaType}`,
|
|
186
|
-
});
|
|
187
199
|
}
|
|
188
200
|
}
|
|
189
201
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { JSONObject, JSONSchema7, JSONValue } from '@ai-sdk/provider';
|
|
2
|
-
import {
|
|
1
|
+
import type { JSONObject, JSONSchema7, JSONValue } from '@ai-sdk/provider';
|
|
2
|
+
import {
|
|
3
|
+
lazySchema,
|
|
4
|
+
zodSchema,
|
|
5
|
+
type InferSchema,
|
|
6
|
+
} from '@ai-sdk/provider-utils';
|
|
3
7
|
import { z } from 'zod/v4';
|
|
4
8
|
|
|
5
9
|
const jsonValueSchema: z.ZodType<JSONValue> = z.lazy(() =>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APICallError,
|
|
3
|
-
JSONValue,
|
|
4
|
-
LanguageModelV4,
|
|
5
|
-
LanguageModelV4Prompt,
|
|
6
|
-
LanguageModelV4CallOptions,
|
|
7
|
-
LanguageModelV4Content,
|
|
8
|
-
LanguageModelV4FinishReason,
|
|
9
|
-
LanguageModelV4GenerateResult,
|
|
10
|
-
LanguageModelV4ProviderTool,
|
|
11
|
-
LanguageModelV4StreamPart,
|
|
12
|
-
LanguageModelV4StreamResult,
|
|
13
|
-
LanguageModelV4ToolApprovalRequest,
|
|
14
|
-
SharedV4ProviderMetadata,
|
|
15
|
-
SharedV4Warning,
|
|
3
|
+
type JSONValue,
|
|
4
|
+
type LanguageModelV4,
|
|
5
|
+
type LanguageModelV4Prompt,
|
|
6
|
+
type LanguageModelV4CallOptions,
|
|
7
|
+
type LanguageModelV4Content,
|
|
8
|
+
type LanguageModelV4FinishReason,
|
|
9
|
+
type LanguageModelV4GenerateResult,
|
|
10
|
+
type LanguageModelV4ProviderTool,
|
|
11
|
+
type LanguageModelV4StreamPart,
|
|
12
|
+
type LanguageModelV4StreamResult,
|
|
13
|
+
type LanguageModelV4ToolApprovalRequest,
|
|
14
|
+
type SharedV4ProviderMetadata,
|
|
15
|
+
type SharedV4Warning,
|
|
16
16
|
} from '@ai-sdk/provider';
|
|
17
17
|
import {
|
|
18
18
|
combineHeaders,
|
|
@@ -20,57 +20,57 @@ import {
|
|
|
20
20
|
createJsonResponseHandler,
|
|
21
21
|
createToolNameMapping,
|
|
22
22
|
generateId,
|
|
23
|
-
InferSchema,
|
|
24
23
|
isCustomReasoning,
|
|
25
24
|
parseProviderOptions,
|
|
26
|
-
ParseResult,
|
|
27
25
|
postJsonToApi,
|
|
28
26
|
serializeModelOptions,
|
|
29
27
|
WORKFLOW_DESERIALIZE,
|
|
30
28
|
WORKFLOW_SERIALIZE,
|
|
29
|
+
type InferSchema,
|
|
30
|
+
type ParseResult,
|
|
31
31
|
} from '@ai-sdk/provider-utils';
|
|
32
|
-
import { OpenAIConfig } from '../openai-config';
|
|
32
|
+
import type { OpenAIConfig } from '../openai-config';
|
|
33
33
|
import { openaiFailedResponseHandler } from '../openai-error';
|
|
34
34
|
import { getOpenAILanguageModelCapabilities } from '../openai-language-model-capabilities';
|
|
35
|
-
import { applyPatchInputSchema } from '../tool/apply-patch';
|
|
36
|
-
import {
|
|
35
|
+
import type { applyPatchInputSchema } from '../tool/apply-patch';
|
|
36
|
+
import type {
|
|
37
37
|
codeInterpreterInputSchema,
|
|
38
38
|
codeInterpreterOutputSchema,
|
|
39
39
|
} from '../tool/code-interpreter';
|
|
40
|
-
import { fileSearchOutputSchema } from '../tool/file-search';
|
|
41
|
-
import { imageGenerationOutputSchema } from '../tool/image-generation';
|
|
42
|
-
import { localShellInputSchema } from '../tool/local-shell';
|
|
43
|
-
import { mcpOutputSchema } from '../tool/mcp';
|
|
44
|
-
import { shellInputSchema, shellOutputSchema } from '../tool/shell';
|
|
45
|
-
import {
|
|
40
|
+
import type { fileSearchOutputSchema } from '../tool/file-search';
|
|
41
|
+
import type { imageGenerationOutputSchema } from '../tool/image-generation';
|
|
42
|
+
import type { localShellInputSchema } from '../tool/local-shell';
|
|
43
|
+
import type { mcpOutputSchema } from '../tool/mcp';
|
|
44
|
+
import type { shellInputSchema, shellOutputSchema } from '../tool/shell';
|
|
45
|
+
import type {
|
|
46
46
|
toolSearchInputSchema,
|
|
47
47
|
toolSearchOutputSchema,
|
|
48
48
|
} from '../tool/tool-search';
|
|
49
|
-
import { webSearchOutputSchema } from '../tool/web-search';
|
|
49
|
+
import type { webSearchOutputSchema } from '../tool/web-search';
|
|
50
50
|
import {
|
|
51
51
|
convertOpenAIResponsesUsage,
|
|
52
|
-
OpenAIResponsesUsage,
|
|
52
|
+
type OpenAIResponsesUsage,
|
|
53
53
|
} from './convert-openai-responses-usage';
|
|
54
54
|
import { convertToOpenAIResponsesInput } from './convert-to-openai-responses-input';
|
|
55
55
|
import { mapOpenAIResponseFinishReason } from './map-openai-responses-finish-reason';
|
|
56
56
|
import {
|
|
57
|
-
OpenAIResponsesChunk,
|
|
58
57
|
openaiResponsesChunkSchema,
|
|
59
|
-
OpenAIResponsesIncludeOptions,
|
|
60
|
-
OpenAIResponsesIncludeValue,
|
|
61
|
-
OpenAIResponsesLogprobs,
|
|
62
58
|
openaiResponsesResponseSchema,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
type OpenAIResponsesChunk,
|
|
60
|
+
type OpenAIResponsesIncludeOptions,
|
|
61
|
+
type OpenAIResponsesIncludeValue,
|
|
62
|
+
type OpenAIResponsesLogprobs,
|
|
63
|
+
type OpenAIResponsesWebSearchAction,
|
|
64
|
+
type OpenAIResponsesApplyPatchOperationDiffDeltaChunk,
|
|
65
|
+
type OpenAIResponsesApplyPatchOperationDiffDoneChunk,
|
|
66
66
|
} from './openai-responses-api';
|
|
67
67
|
import {
|
|
68
|
-
OpenAIResponsesModelId,
|
|
69
68
|
openaiLanguageModelResponsesOptionsSchema,
|
|
70
69
|
TOP_LOGPROBS_MAX,
|
|
70
|
+
type OpenAIResponsesModelId,
|
|
71
71
|
} from './openai-responses-options';
|
|
72
72
|
import { prepareResponsesTools } from './openai-responses-prepare-tools';
|
|
73
|
-
import {
|
|
73
|
+
import type {
|
|
74
74
|
ResponsesCompactionProviderMetadata,
|
|
75
75
|
ResponsesProviderMetadata,
|
|
76
76
|
ResponsesReasoningProviderMetadata,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
LanguageModelV4CallOptions,
|
|
3
|
-
SharedV4ProviderReference,
|
|
4
|
-
SharedV4Warning,
|
|
5
2
|
UnsupportedFunctionalityError,
|
|
3
|
+
type LanguageModelV4CallOptions,
|
|
4
|
+
type SharedV4ProviderReference,
|
|
5
|
+
type SharedV4Warning,
|
|
6
6
|
} from '@ai-sdk/provider';
|
|
7
7
|
import {
|
|
8
8
|
resolveProviderReference,
|
|
9
|
-
ToolNameMapping,
|
|
10
9
|
validateTypes,
|
|
10
|
+
type ToolNameMapping,
|
|
11
11
|
} from '@ai-sdk/provider-utils';
|
|
12
12
|
import { codeInterpreterArgsSchema } from '../tool/code-interpreter';
|
|
13
13
|
import { fileSearchArgsSchema } from '../tool/file-search';
|
|
@@ -18,7 +18,7 @@ import { shellArgsSchema } from '../tool/shell';
|
|
|
18
18
|
import { toolSearchArgsSchema } from '../tool/tool-search';
|
|
19
19
|
import { webSearchArgsSchema } from '../tool/web-search';
|
|
20
20
|
import { webSearchPreviewArgsSchema } from '../tool/web-search-preview';
|
|
21
|
-
import { OpenAIResponsesTool } from './openai-responses-api';
|
|
21
|
+
import type { OpenAIResponsesTool } from './openai-responses-api';
|
|
22
22
|
|
|
23
23
|
export async function prepareResponsesTools({
|
|
24
24
|
tools,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
openaiResponsesChunkSchema,
|
|
3
3
|
OpenAIResponsesLogprobs,
|
|
4
4
|
} from './openai-responses-api';
|
|
5
|
-
import { InferSchema } from '@ai-sdk/provider-utils';
|
|
5
|
+
import type { InferSchema } from '@ai-sdk/provider-utils';
|
|
6
6
|
|
|
7
7
|
type OpenaiResponsesChunk = InferSchema<typeof openaiResponsesChunkSchema>;
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SkillsV4, SharedV4Warning } from '@ai-sdk/provider';
|
|
1
|
+
import type { SkillsV4, SharedV4Warning } from '@ai-sdk/provider';
|
|
2
2
|
import {
|
|
3
3
|
combineHeaders,
|
|
4
|
-
|
|
4
|
+
convertInlineFileDataToUint8Array,
|
|
5
5
|
createJsonResponseHandler,
|
|
6
|
-
FetchFunction,
|
|
7
6
|
postFormDataToApi,
|
|
7
|
+
type FetchFunction,
|
|
8
8
|
} from '@ai-sdk/provider-utils';
|
|
9
9
|
import { openaiFailedResponseHandler } from '../openai-error';
|
|
10
10
|
import { openaiSkillResponseSchema } from './openai-skills-api';
|
|
@@ -40,11 +40,7 @@ export class OpenAISkills implements SkillsV4 {
|
|
|
40
40
|
const formData = new FormData();
|
|
41
41
|
|
|
42
42
|
for (const file of params.files) {
|
|
43
|
-
const content =
|
|
44
|
-
typeof file.content === 'string'
|
|
45
|
-
? convertBase64ToUint8Array(file.content)
|
|
46
|
-
: file.content;
|
|
47
|
-
|
|
43
|
+
const content = convertInlineFileDataToUint8Array(file.data);
|
|
48
44
|
formData.append('files[]', new Blob([content]), file.path);
|
|
49
45
|
}
|
|
50
46
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpeechModelV4, SharedV4Warning } from '@ai-sdk/provider';
|
|
1
|
+
import type { SpeechModelV4, SharedV4Warning } from '@ai-sdk/provider';
|
|
2
2
|
import {
|
|
3
3
|
combineHeaders,
|
|
4
4
|
createBinaryResponseHandler,
|
|
@@ -8,14 +8,13 @@ import {
|
|
|
8
8
|
WORKFLOW_DESERIALIZE,
|
|
9
9
|
WORKFLOW_SERIALIZE,
|
|
10
10
|
} from '@ai-sdk/provider-utils';
|
|
11
|
-
import { OpenAIConfig } from '../openai-config';
|
|
11
|
+
import type { OpenAIConfig } from '../openai-config';
|
|
12
12
|
import { openaiFailedResponseHandler } from '../openai-error';
|
|
13
|
-
import { OpenAISpeechAPITypes } from './openai-speech-api';
|
|
13
|
+
import type { OpenAISpeechAPITypes } from './openai-speech-api';
|
|
14
14
|
import {
|
|
15
15
|
openaiSpeechModelOptionsSchema,
|
|
16
|
-
OpenAISpeechModelId,
|
|
16
|
+
type OpenAISpeechModelId,
|
|
17
17
|
} from './openai-speech-options';
|
|
18
|
-
|
|
19
18
|
interface OpenAISpeechModelConfig extends OpenAIConfig {
|
|
20
19
|
_internal?: {
|
|
21
20
|
currentDate?: () => Date;
|
package/src/tool/file-search.ts
CHANGED
package/src/tool/mcp.ts
CHANGED
package/src/tool/tool-search.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { JSONObject } from '@ai-sdk/provider';
|
|
1
|
+
import type { JSONObject } from '@ai-sdk/provider';
|
|
2
2
|
import {
|
|
3
3
|
createProviderDefinedToolFactoryWithOutputSchema,
|
|
4
|
-
FlexibleSchema,
|
|
5
4
|
lazySchema,
|
|
6
5
|
zodSchema,
|
|
6
|
+
type FlexibleSchema,
|
|
7
7
|
} from '@ai-sdk/provider-utils';
|
|
8
8
|
import { z } from 'zod/v4';
|
|
9
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
TranscriptionModelV4,
|
|
3
3
|
TranscriptionModelV4CallOptions,
|
|
4
4
|
SharedV4Warning,
|
|
@@ -14,15 +14,14 @@ import {
|
|
|
14
14
|
WORKFLOW_DESERIALIZE,
|
|
15
15
|
WORKFLOW_SERIALIZE,
|
|
16
16
|
} from '@ai-sdk/provider-utils';
|
|
17
|
-
import { OpenAIConfig } from '../openai-config';
|
|
17
|
+
import type { OpenAIConfig } from '../openai-config';
|
|
18
18
|
import { openaiFailedResponseHandler } from '../openai-error';
|
|
19
19
|
import { openaiTranscriptionResponseSchema } from './openai-transcription-api';
|
|
20
20
|
import {
|
|
21
|
-
OpenAITranscriptionModelId,
|
|
22
21
|
openAITranscriptionModelOptions,
|
|
23
|
-
|
|
22
|
+
type OpenAITranscriptionModelId,
|
|
23
|
+
type OpenAITranscriptionModelOptions,
|
|
24
24
|
} from './openai-transcription-options';
|
|
25
|
-
|
|
26
25
|
export type OpenAITranscriptionCallOptions = Omit<
|
|
27
26
|
TranscriptionModelV4CallOptions,
|
|
28
27
|
'providerOptions'
|