if (FALSE) {
# Example usage of the function
api_key <- "YOUR_OPENAI_API_KEY"
file_path <- "path/to/your/text_file.txt"
response <- textFileInput4ai(file_path, api_key = api_key, max_tokens = 50)
cat(response)
}
Run the code above in your browser using DataLab