#400 Response when setting Temperature

16 messages · Page 1 of 1 (latest)

tardy flower
#

Using GPT text-davinci-003, when I specify a value for temperature, the API returns a 400. When I don't specify a value, it returns a response, but its no longer as predictable as it was. Has anyone else run into this or know a solution?

fierce sentinel
tardy flower
#
const res = await this.client.createCompletion({
                model: 'text-davinci-003',
                max_tokens: 4096 - Math.ceil(section.length / 3),
                temperature: 0,
                prompt: `This is a test`})
fierce sentinel
#

I don't think you can have temperature 0

#

actually, I don't remember exactly

#

Did you try this with other temperature values?

#

Try 0.01

#

Also, max_tokens: 4096 - Math.ceil(section.length / 3), is not a valid way of calculating max tokens, you need to use a tokenizer to calculate the amount of tokens in a given set of text

viscid kite
fierce sentinel
#

I forgot 😅

tardy flower
#

I definitely was able to use temp: 0 up until a few days ago. But yeah that must be it. If it use 0.001 then it works

fierce sentinel
#

Yeah I think it is temp 0, it is problematic sometimes just like temp >1

#

you can use like 0.000001

tardy flower
#

Temp 0 was giving me perfect JSON every time. >0 gave me some weird artifacts in the json

fierce sentinel
#

hmm, what if you try changing other parameters instead of the temp to see if it works? For example, make your max_tokens 300 and see what happens with temp = 0