Comparing version 4.44.0 to 4.45.0
# Changelog | ||
## 4.45.0 (2024-05-11) | ||
Full Changelog: [v4.44.0...v4.45.0](https://github.com/openai/openai-node/compare/v4.44.0...v4.45.0) | ||
### Features | ||
* **azure:** batch api ([#839](https://github.com/openai/openai-node/issues/839)) ([e279f8c](https://github.com/openai/openai-node/commit/e279f8c51aa80cb913ccb6df647407bea1f2f071)) | ||
### Chores | ||
* **dependency:** bumped Next.js version ([#836](https://github.com/openai/openai-node/issues/836)) ([babb140](https://github.com/openai/openai-node/commit/babb1404751059bdd171b792d03fd21272dd8f8b)) | ||
* **docs:** add SECURITY.md ([#838](https://github.com/openai/openai-node/issues/838)) ([6e556d9](https://github.com/openai/openai-node/commit/6e556d9e12341155cc13fe226ab110d63858370e)) | ||
## 4.44.0 (2024-05-09) | ||
@@ -4,0 +18,0 @@ |
@@ -237,2 +237,3 @@ import * as Core from "./core.js"; | ||
private _azureADTokenProvider; | ||
private _deployment; | ||
apiVersion: string; | ||
@@ -239,0 +240,0 @@ /** |
11
index.js
@@ -184,8 +184,3 @@ "use strict"; | ||
} | ||
if (deployment) { | ||
baseURL = `${endpoint}/openai/deployments/${deployment}`; | ||
} | ||
else { | ||
baseURL = `${endpoint}/openai`; | ||
} | ||
baseURL = `${endpoint}/openai`; | ||
} | ||
@@ -206,2 +201,3 @@ else { | ||
this.apiVersion = apiVersion; | ||
this._deployment = deployment; | ||
} | ||
@@ -213,3 +209,3 @@ buildRequest(options) { | ||
} | ||
const model = options.body['model']; | ||
const model = this._deployment || options.body['model']; | ||
delete options.body['model']; | ||
@@ -262,2 +258,3 @@ if (model !== undefined && !this.baseURL.includes('/deployments')) { | ||
'/images/generations', | ||
'/batches', | ||
]); | ||
@@ -264,0 +261,0 @@ const API_KEY_SENTINEL = '<Missing Key>'; |
{ | ||
"name": "openai", | ||
"version": "4.44.0", | ||
"version": "4.45.0", | ||
"description": "The official TypeScript library for the OpenAI API", | ||
@@ -5,0 +5,0 @@ "author": "OpenAI <support@openai.com>", |
@@ -22,3 +22,3 @@ # OpenAI Node API Library | ||
```ts | ||
import OpenAI from 'https://deno.land/x/openai@v4.44.0/mod.ts'; | ||
import OpenAI from 'https://deno.land/x/openai@v4.45.0/mod.ts'; | ||
``` | ||
@@ -25,0 +25,0 @@ |
@@ -349,2 +349,3 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
private _azureADTokenProvider: (() => Promise<string>) | undefined; | ||
private _deployment: string | undefined; | ||
apiVersion: string = ''; | ||
@@ -416,7 +417,3 @@ /** | ||
if (deployment) { | ||
baseURL = `${endpoint}/openai/deployments/${deployment}`; | ||
} else { | ||
baseURL = `${endpoint}/openai`; | ||
} | ||
baseURL = `${endpoint}/openai`; | ||
} else { | ||
@@ -437,2 +434,3 @@ if (endpoint) { | ||
this.apiVersion = apiVersion; | ||
this._deployment = deployment; | ||
} | ||
@@ -449,3 +447,3 @@ | ||
} | ||
const model = options.body['model']; | ||
const model = this._deployment || options.body['model']; | ||
delete options.body['model']; | ||
@@ -501,2 +499,3 @@ if (model !== undefined && !this.baseURL.includes('/deployments')) { | ||
'/images/generations', | ||
'/batches', | ||
]); | ||
@@ -503,0 +502,0 @@ |
@@ -1,1 +0,1 @@ | ||
export const VERSION = '4.44.0'; // x-release-please-version | ||
export const VERSION = '4.45.0'; // x-release-please-version |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "4.44.0"; | ||
export declare const VERSION = "4.45.0"; | ||
//# sourceMappingURL=version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VERSION = void 0; | ||
exports.VERSION = '4.44.0'; // x-release-please-version | ||
exports.VERSION = '4.45.0'; // x-release-please-version | ||
//# sourceMappingURL=version.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2434338
41722