I have tried to post the response twice now into the forum but because of the repeated lines it keeps getting blocked by your automated spam filter. HELP!
This is the request I am making:
const response = await openai.createCompletion({
model: 'text-davinci-003',
prompt: 'show me how to use the javascript array method reduce()' ,
temperature: 0.2,
max_tokens: 2000,
});
Seems simple enough, but the results have the same repeated lines until it runs out of tokens or times out. What am I doing wrong?
I will test to see what happens using the web interface like you have done, but I am actually calling the API from AWS Lambda. I cant show you the text (because the spam prevention will flag the post) but here is a screenshot from the logs that shows the types of response I regularly get:
for the input that got the screenshot output the prompt was ‘Write an algorithm to solve sliding windows problems in C sharp code’ and the model was ‘ada-code-search-text’, but the API just gets caught in some crazy loop, and it happens about half the time (not all the time).
{
"model": "ada-code-search-text",
"prompt": "Write an algorithm to solve sliding windows problems in C sharp code",
"temperature": 0.2,
"max_tokens": 2000,
"n": 1
}
yeah, I had also seen the issue when I was using ‘text-davinci-003’ but at the time I also had some commented out properties in the JSON for the request which may have caused the issue. I have since removed those commented properties and text-davinci-003 seems to be giving me back reasonable results. Ill keep testing today and let you know what I find. I will also try and rebreak it with the commented out properties and see what I find.