promptable icon indicating copy to clipboard operation
promptable copied to clipboard

Setting "\n" for stop causes failure

Open austintackaberry opened this issue 2 years ago • 1 comments

SyntaxError: Unexpected token in JSON at position 1
 at JSON.parse (<anonymous>)
 at unescapeStopTokens (/usr/src/app/node_modules/.pnpm/[email protected]/node_modules/promptable/dist/index.js:644:17)
 at OpenAI.generate (/usr/src/app/node_modules/.pnpm/[email protected]/node_modules/promptable/dist/index.js:688:24)
 at runCompletion (/usr/src/app/dist/src/lib/promptable.js:13:33)
"promptable": "^0.0.10"
const options = {
    model: "text-davinci-003",
    temperature: 0,
    max_tokens: 5,
    top_p: 1,
    stop: "\n",
  };

austintackaberry avatar Feb 20 '23 05:02 austintackaberry

Thanks for reporting. Will take a look today

cfortuner avatar Feb 20 '23 12:02 cfortuner