Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

// Call the GPT-3 API to generate the report
openai.complete({
engine: model,
prompt: prompt,
max_tokens: 2048,
n: 1,
stop: '\n\n'
}).then(response => {
const report = response.choices0.text.trim();
console.log(report);
}).catch(error => {
console.error(error);
});


  • GPT-3 pricing can be found

...

  • here
  • Testing the api can be done on the following playground link