@ai-sdk/openai 2.1.0-beta.8 → 2.1.0-beta.9
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 +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// src/openai-provider.ts
|
|
2
2
|
import {
|
|
3
3
|
loadApiKey,
|
|
4
|
+
loadOptionalSetting,
|
|
4
5
|
withoutTrailingSlash,
|
|
5
6
|
withUserAgentSuffix
|
|
6
7
|
} from "@ai-sdk/provider-utils";
|
|
@@ -4109,12 +4110,17 @@ var openaiTranscriptionResponseSchema = z19.object({
|
|
|
4109
4110
|
});
|
|
4110
4111
|
|
|
4111
4112
|
// src/version.ts
|
|
4112
|
-
var VERSION = true ? "2.1.0-beta.
|
|
4113
|
+
var VERSION = true ? "2.1.0-beta.9" : "0.0.0-test";
|
|
4113
4114
|
|
|
4114
4115
|
// src/openai-provider.ts
|
|
4115
4116
|
function createOpenAI(options = {}) {
|
|
4116
4117
|
var _a, _b;
|
|
4117
|
-
const baseURL = (_a = withoutTrailingSlash(
|
|
4118
|
+
const baseURL = (_a = withoutTrailingSlash(
|
|
4119
|
+
loadOptionalSetting({
|
|
4120
|
+
settingValue: options.baseURL,
|
|
4121
|
+
environmentVariableName: "OPENAI_BASE_URL"
|
|
4122
|
+
})
|
|
4123
|
+
)) != null ? _a : "https://api.openai.com/v1";
|
|
4118
4124
|
const providerName = (_b = options.name) != null ? _b : "openai";
|
|
4119
4125
|
const getHeaders = () => withUserAgentSuffix(
|
|
4120
4126
|
{
|