save_image | R Documentation |
Extracts base64-encoded image data from the Gemini API response text and saves it as a binary image file.
save_image(res_txt, output_path)
res_txt |
Character string. The raw response text from the Gemini API. |
output_path |
Character string. The file path to save the decoded image. |
The path to the saved image file, or NULL if no image data was found.
## Not run:
save_image(res_txt, "output.png")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.