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.
@@ -1 +1 @@
1
- 5.3.1
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: "Once upon a time",
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);