JusticeRage / Gepetto

IDA plugin which queries uses language models to speed up reverse-engineering
GNU General Public License v3.0
2.87k stars 263 forks source link

Replace the "davinci-003" model with the "text-davinci-002-render" model. #7

Closed burpheart closed 1 year ago

burpheart commented 1 year ago

You can use the "text-davinci-002-render" model to replace the "davinci-003" model.
It is the model that ChatGPT is using. It is currently available for free in BETA testing. It also has a wider token limit.

HumanGamer commented 1 year ago

I wouldn't mind trying this myself, sounds better than the current option. I can't find much info on it though, how do I get access to it? I changed the code and it says

Request to davinci-003 sent...
davinci-003 could not complete the request: That model does not exist

(i didn't update the log messages so they say it's the old model)

JusticeRage commented 1 year ago

I've been trying out the davinci-002 and code-davinci-002 models and I have to say that I'm not really convinced by the results. I may add the ability to pick one of them as an option, but this will probably be low-priority considering that it produces quite unreliable answers.

burpheart commented 1 year ago

I wouldn't mind trying this myself, sounds better than the current option. I can't find much info on it though, how do I get access to it? I changed the code and it says

Request to davinci-003 sent...
davinci-003 could not complete the request: That model does not exist

(i didn't update the log messages so they say it's the old model)

Have a look at this module https://github.com/acheong08/ChatGPT

CoolPeach7 commented 1 year ago

image

trodery commented 1 year ago

image

This image as translated by Google: (typos are also by Google)


To replace the model Gepetto uses with text-davinci-002-render, you need to open the gepetto.py file and Find the following line of code:

openai.api_key =

After this line, add a line to specify the model name used by Gepetto:

openai.model = "text-davinci-002-render"

Save the file, reload the Gepetto plugin, and Gepetto will use the text-davinci-002-render model to process the output of the disassembler.
JusticeRage commented 1 year ago

As far as I can tell, other models provided by OpenAI do not work as well when it comes to explaining code unfortunately. I'll close this issue for now, until such a time that a better model becomes available. For now, I don't think it's worth adding options that are (again, based on my testing), strictly worse.