JamesHWade / gpttools

gpttools extends gptstudio for package development to help you document code, write tests, or even explain code
https://jameshwade.github.io/gpttools/
Other
291 stars 27 forks source link

Script to function not working #40

Closed alexfg closed 1 year ago

alexfg commented 1 year ago

Hello again!

I found that when accessing the Script to Function option the following error is returned:

Error in gptstudio::gpt_create(model = "text-davinci-edit-001", instruction = "convert this R code into an R function or a few R functions",  : 
  unused argument (instruction = "convert this R code into an R function or a few R functions")

I tried to replace the gpt_createwith gpt_edit in addin_script_to_function.R but I get no input returned after the message Inserting text from GPT...

Also, when accessin the function from the Addin dropdown in Rstudio the hover comment is referring to the commenting function not the script to function one.

JamesHWade commented 1 year ago

Thanks for reporting (again)! Should be fixed with #41. This also converts it to the actual ChatGPT model.