htadashi / GPT3-AHK

An AutoHotKey script that enables you to use GPT3 in any input field on your computer
MIT License
104 stars 17 forks source link

The script doesn't work when I try to set temperature in request body #3

Closed dino1729 closed 1 year ago

dino1729 commented 1 year ago

I am trying to set the temperature of the response to 0.5 (instead of the default) by adding an additional line in the function: body.temperature := 0.5 and it fails. The autocomplete will only output a space character. Is there a way to fix this?

htadashi commented 1 year ago

@dino1729 Thanks for your report. I think I isolated the cause of the bug. The method JSON.Dump from cJson converts 0.5 to "0.5" but OpenAI server expects a float number instead of a string. I opened an issue there (https://github.com/G33kDude/cJson.ahk/issues/6) and will wait a fix to add the temperature parameter in the code.

htadashi commented 1 year ago

@dino1729 I've released a fix. You can change the temperature by changing the parameter MODEL_AUTOCOMPLETE_TEMP in L13