@ai-sdk/openai 4.0.0-beta.16 → 4.0.0-beta.17
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 +6 -0
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +11 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/responses/convert-to-openai-responses-input.ts +12 -0
- package/src/responses/openai-responses-api.ts +1 -0
package/package.json
CHANGED
|
@@ -740,6 +740,11 @@ export async function convertToOpenAIResponsesInput({
|
|
|
740
740
|
filename: item.filename ?? 'data',
|
|
741
741
|
file_data: `data:${item.mediaType};base64,${item.data}`,
|
|
742
742
|
};
|
|
743
|
+
case 'file-url':
|
|
744
|
+
return {
|
|
745
|
+
type: 'input_file' as const,
|
|
746
|
+
file_url: item.url,
|
|
747
|
+
};
|
|
743
748
|
default:
|
|
744
749
|
warnings.push({
|
|
745
750
|
type: 'other',
|
|
@@ -804,6 +809,13 @@ export async function convertToOpenAIResponsesInput({
|
|
|
804
809
|
};
|
|
805
810
|
}
|
|
806
811
|
|
|
812
|
+
case 'file-url': {
|
|
813
|
+
return {
|
|
814
|
+
type: 'input_file' as const,
|
|
815
|
+
file_url: item.url,
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
|
|
807
819
|
default: {
|
|
808
820
|
warnings.push({
|
|
809
821
|
type: 'other',
|
|
@@ -107,6 +107,7 @@ export type OpenAIResponsesFunctionCallOutput = {
|
|
|
107
107
|
| { type: 'input_text'; text: string }
|
|
108
108
|
| { type: 'input_image'; image_url: string }
|
|
109
109
|
| { type: 'input_file'; filename: string; file_data: string }
|
|
110
|
+
| { type: 'input_file'; file_url: string }
|
|
110
111
|
>;
|
|
111
112
|
};
|
|
112
113
|
|