Hi @guoliangzeng ,I am trying to use this code but I get this error Downloading GitHub repo jcrodriguez1989/chatgpt@feature.jcr.switch_api_url Error in utils::download.file(url, path, method = method, quiet = quiet, : cannot open URL 'https://api.github.com/repos/jcrodriguez1989/chatgpt/tarball/feature.jcr.switch_api_url' any Idea what i can do?
IvanKrSt opened this issue · 1 comments
IvanKrSt commented
Hi @guoliangzeng ,
I created a branch that allows changing the OPENAI's API URL. Could you try doing this?
Fully restart your R session, and then:
remotes::install_github("jcrodriguez1989/chatgpt@feature.jcr.switch_api_url")
Sys.setenv(OPENAI_API_URL = "https://api.chatanywhere.com.cn/v1")
# If this doesn't work, do `Sys.setenv(OPENAI_API_URL = "https://api.chatanywhere.com.cn")`
library("chatgpt")
cat(ask_chatgpt("What do you think about R language?"))
Please, let me know if you get any errors.
Originally posted by @jcrodriguez1989 in #48 (comment)