'OpenAI not returning a result?

I'm trying to use the OpenAI beta but I can't seem to get a result. I'm accessing the API via an NPM package (https://www.npmjs.com/package/openai-api). I have that setup and working but when I make a request the response I'm getting is missing any content in the response object.

Here's my code

const suggestedDescription = await openai.complete( {
        engine: 'davinci',
        prompt: metadata.description,
        maxTokens: 20,
        temperature: 0,
        topP: 1,
        presencePenalty: 0,
        frequencyPenalty: 0,
        stop: ['...']
      } );

The resulting object looks like this:

suggestedDescription { text: '', index: 0, logprobs: null, finish_reason: 'stop' }

Any thoughts?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source