if (FALSE) {
Sys.setenv(OPENAI_API_KEY = "sk-xxxxxx")
# Complete a sentence
resp <- create_completion(
prompt = "The most important assumption of OLS regression is",
model = "gpt-3.5-turbo-instruct",
max_tokens = 100
)
cat(resp$choices[[1]]$text)
}
Run the code above in your browser using DataLab