openai 2.0.1 → 2.0.5
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/.openapi-generator/VERSION +1 -1
- package/README.md +4 -5
- package/api.ts +488 -25
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +379 -25
- package/dist/api.js +203 -5
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
5.
|
|
1
|
+
5.4.0
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ const configuration = new Configuration({
|
|
|
22
22
|
});
|
|
23
23
|
const openai = new OpenAIApi(configuration);
|
|
24
24
|
|
|
25
|
-
const completion = await openai.createCompletion("davinci", {
|
|
25
|
+
const completion = await openai.createCompletion("text-davinci-001", {
|
|
26
26
|
prompt: "Hello world",
|
|
27
27
|
});
|
|
28
28
|
console.log(completion.data.choices[0].text);
|
|
@@ -37,10 +37,9 @@ All of the available API request functions additionally contain an optional fina
|
|
|
37
37
|
|
|
38
38
|
```javascript
|
|
39
39
|
const completion = await openai.createCompletion(
|
|
40
|
-
"davinci",
|
|
40
|
+
"text-davinci-001",
|
|
41
41
|
{
|
|
42
|
-
prompt: "
|
|
43
|
-
max_tokens: 5,
|
|
42
|
+
prompt: "Hello world",
|
|
44
43
|
},
|
|
45
44
|
{
|
|
46
45
|
timeout: 1000,
|
|
@@ -57,7 +56,7 @@ API requests can potentially return errors due to invalid inputs or other issues
|
|
|
57
56
|
|
|
58
57
|
```javascript
|
|
59
58
|
try {
|
|
60
|
-
const completion = await openai.createCompletion("davinci", {
|
|
59
|
+
const completion = await openai.createCompletion("text-davinci-001", {
|
|
61
60
|
prompt: "Hello world",
|
|
62
61
|
});
|
|
63
62
|
console.log(completion.data.choices[0].text);
|