irudnyts / openai

An R package-wrapper around OpenAI API
https://irudnyts.github.io/openai/
Other
164 stars 28 forks source link

R >= 4.2 dependency #27

Closed brunomioto closed 1 year ago

brunomioto commented 1 year ago

Is it necessary?

Installing CRAN version on 4.1.1

Warning in install.packages :
  package ‘openai’ is not available for this version of R

Installing Github version on 4.1.1

ERROR: this R is version 4.1.1, package 'openai' requires R >= 4.2
irudnyts commented 1 year ago

It is not, but that was a requirement of CRAN (if I remember correctly). If you have to stick to 4.1.1, I suggest cloning the repo, changing 4.2 to 4.1 in DESCRIPTION, and installing the package from the source (Install button in Build section of RStudio).

JamesHWade commented 1 year ago

I think you are right about it requiring a minimum version of R, but you make be able to put an older version. Something like R >= 3.6.

msberends commented 1 year ago

Hi, just wanted to add - our CRAN package relies/depends on R >= 3.0, released in April 2013. CRAN does not require you to rely on the newest R, just that all your functions work in the lowest version number you want to rely on.

I would advise to keep the R dependency number as low as possible to provide this package to as many users as possible. Thousands and thousands of R users are probably on older R versions - they cannot use openai at the moment.

brunomioto commented 1 year ago

Yeah, maybe CRAN suggested supporting 4.2, but not just 4.2. it's advised to not do it: https://r-pkgs.org/description.html#sec-description-imports-suggests

irudnyts commented 1 year ago

You're right, it is indeed not a requirement. In the next version, I will downgrade to 3.4 (the highest version in my imported packages).

olyerickson commented 1 year ago

Given the tremendous interest in ChatGPT et.al. right now, please consider fixing this ASAP.!!

irudnyts commented 1 year ago

The dependence is downgraded to R 3.5 (also available from CRAN).