Comparing version 3.2.1 to 3.3.0
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -10,0 +10,0 @@ * |
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -10,0 +10,0 @@ * |
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -10,0 +10,0 @@ * |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -8,0 +8,0 @@ * |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -11,0 +11,0 @@ * |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -8,0 +8,0 @@ * |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -11,0 +11,0 @@ * |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -8,0 +8,0 @@ * |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -11,0 +11,0 @@ * |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -8,0 +8,0 @@ * |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -11,0 +11,0 @@ * |
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 1.2.0 | ||
* The version of the OpenAPI document: 1.3.0 | ||
* | ||
@@ -10,0 +10,0 @@ * |
{ | ||
"name": "openai", | ||
"version": "3.2.1", | ||
"version": "3.3.0", | ||
"description": "Node.js library for the OpenAI API", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -5,3 +5,3 @@ # OpenAI Node.js Library | ||
**Important note: this library is meant for server-side usage only, as using it in client-side browser code will expose your secret API key. [See here](https://beta.openai.com/docs/api-reference/authentication) for more details.** | ||
> ⚠️ **Important note: this library is meant for server-side usage only, as using it in client-side browser code will expose your secret API key. [See here](https://platform.openai.com/docs/api-reference/authentication) for more details.** | ||
@@ -11,3 +11,3 @@ ## Installation | ||
```bash | ||
$ npm install openai | ||
npm install openai | ||
``` | ||
@@ -17,3 +17,3 @@ | ||
The library needs to be configured with your account's secret key, which is available on the [website](https://beta.openai.com/account/api-keys). We recommend setting it as an environment variable. Here's an example of initializing the library with the API key loaded from an environment variable and creating a completion: | ||
The library needs to be configured with your account's secret key, which is available in your [OpenAI account page](https://platform.openai.com/account/api-keys). We recommend setting it as an environment variable. Here's an example of initializing the library with the API key loaded from an environment variable and creating a completion: | ||
@@ -28,10 +28,10 @@ ```javascript | ||
const completion = await openai.createCompletion({ | ||
model: "text-davinci-003", | ||
prompt: "Hello world", | ||
const chatCompletion = await openai.createChatCompletion({ | ||
model: "gpt-3.5-turbo", | ||
messages: [{role: "user", content: "Hello world"}], | ||
}); | ||
console.log(completion.data.choices[0].text); | ||
console.log(chatCompletion.data.choices[0].message); | ||
``` | ||
Check out the [full API documentation](https://beta.openai.com/docs/api-reference?lang=node.js) for examples of all the available functions. | ||
Check out the [full API documentation](https://platform.openai.com/docs/api-reference?lang=node.js) for examples of all the available functions. | ||
@@ -42,3 +42,2 @@ ### Request options | ||
```javascript | ||
@@ -45,0 +44,0 @@ const completion = await openai.createCompletion( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
490056
9964
90