feat: Add gemini_garden function
This pull request introduces a new function, `gemini_garden`, to interact with the Vertex AI Model Garden for document processing tasks, such as OCR. It also includes updates to the `NAMESPACE` file to support the new functionality and a minor change to the `gemini_narrative` function. Below are the most important changes grouped by theme:
### New Functionality: Vertex AI Model Garden Integration
* Added `gemini_garden` function in `R/gemini_garden.R` to process PDF files using the Vertex AI Model Garden Mistral model. The function encodes PDFs as base64 and sends them to the rawPredict endpoint, with support for future extensions to other document types and tasks.
* Generated documentation for `gemini_garden` in `man/gemini_garden.Rd`, including usage, arguments, return values, examples, and references to official Vertex AI documentation.
### Namespace Updates
* Updated `NAMESPACE` to export the new `gemini_garden` function and added `importFrom(jsonlite,base64_enc)` to support base64 encoding. [[1]](diffhunk://#diff-b6b6854a02ae177f8860f49654ff250c1554d021ae434b6efdbe99d00bdc6055R11) [[2]](diffhunk://#diff-b6b6854a02ae177f8860f49654ff250c1554d021ae434b6efdbe99d00bdc6055R50)
### Minor Enhancements
* Modified `gemini_narrative` in `man/gemini_narrative.Rd` to include an optional `prompt` parameter for additional customization.
合并状态:已合并 合并于 2025-06-24 关闭于 2025-06-24 0 条评论