@ai-sdk/openai 2.0.17 → 2.0.19
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 +19 -0
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +6 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1924,9 +1924,10 @@ async function convertToOpenAIResponsesMessages({
|
|
|
1924
1924
|
};
|
|
1925
1925
|
} else if (part.mediaType === "application/pdf") {
|
|
1926
1926
|
if (part.data instanceof URL) {
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1927
|
+
return {
|
|
1928
|
+
type: "input_file",
|
|
1929
|
+
file_url: part.data.toString()
|
|
1930
|
+
};
|
|
1930
1931
|
}
|
|
1931
1932
|
return {
|
|
1932
1933
|
type: "input_file",
|
|
@@ -2203,7 +2204,8 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2203
2204
|
constructor(modelId, config) {
|
|
2204
2205
|
this.specificationVersion = "v2";
|
|
2205
2206
|
this.supportedUrls = {
|
|
2206
|
-
"image/*": [/^https?:\/\/.*$/]
|
|
2207
|
+
"image/*": [/^https?:\/\/.*$/],
|
|
2208
|
+
"application/pdf": [/^https?:\/\/.*$/]
|
|
2207
2209
|
};
|
|
2208
2210
|
this.modelId = modelId;
|
|
2209
2211
|
this.config = config;
|