2

i am integrate GPT-3 text-davinci-003 algorithm with node js all working good but when we have pass token every time different but every time Same gives reply GPT-3 text-davinci-003 so please give me solution.

 const response = await openai.createCompletion({
   model: text-davinci-003,
   prompt: 'what is javascript',
   temperature: 0.05,
   max_tokens: 1000,
   top_p: 0.5,
   frequency_penalty: 0,
   presence_penalty: 0,
   stop: ["END OF POLICY"]
});
           

i am passing 1000 token but this reply only give max token 160,180,210 like but i want to give large token reply

Rok Benko
  • 14,265
  • 2
  • 24
  • 49
Hussain
  • 106
  • 8

1 Answers1

0

GPT-3 is a really sophisticated text complete engine. When, based on its training, it has completed the prompt it will stop.

Increasing max_token won't necessarily solve this.

The way you solve it is through your prompt design. You need to tell GPT-3 exactly how you want it to respond.

Using your example, you might expand your prompt to say:

Write a very detailed essay on "What is JavaScript". Your answer should be approximately 750 words long and written in a style suitable for a university graduate.

Testing this prompt in the OpenAI playground gave me a response that was around 500 tokens.

Play around with the prompt in the Playground until you find exactly what you need.

Kane Hooper
  • 1,531
  • 1
  • 9
  • 21