I’m workgin with R
library(gemini.R)
library(markdown)
library(rstudioapi)
setAPI(“My_Key”)
prompt ← " Good Morning "
gemini_response ← gemini(prompt = prompt)
Convert the Markdown text to HTML
formatted_html ← markdownToHTML(text = gemini_response, fragment.only = TRUE)
Create a temporary file to hold the HTML content
temp_html_file ← tempfile(fileext = “.html”)
Write the formatted HTML to the temporary file
writeLines(formatted_html, temp_html_file)
Use the RStudio viewer to display the HTML file
viewer(temp_html_file)
I have a brand new key but being told
Error in `req_perform()`:
! HTTP 429 Too Many Requests.
Run `rlang::last_trace()` to see where the error occurred.
Any R users have any idea what is going on .