ITADN

Add gemini_structured function for structured API responses

#44Pull Requestjhk0530 创建于 2025-06-20已合并
J
jhk0530commented
This pull request introduces a new function, `gemini_structured`, to generate structured JSON responses from the Gemini API, along with associated updates to the package metadata, namespace, and documentation. The changes enhance the package's functionality and include the following key updates: ### New Functionality * **`gemini_structured` function**: Added a new function in `R/gemini_structured.R` to generate structured (JSON) responses from the Gemini API. It includes parameters for prompt, schema, model, temperature, token limits, and other configuration options. The function validates the API key, constructs the request, and parses the response. ### Documentation Updates * **Documentation for `gemini_structured`**: Added a new `.Rd` file (`man/gemini_structured.Rd`) generated by `roxygen2` to document the `gemini_structured` function, including its usage, arguments, return value, and examples. ### Metadata and Namespace Updates * **Export of `gemini_structured`**: Updated the `NAMESPACE` file to export the new `gemini_structured` function, making it available for external use. * **Version bump**: Updated the package version in `DESCRIPTION` from `0.14.1` to `0.15.0` to reflect the new functionality.
合并状态:已合并 合并于 2025-06-20 关闭于 2025-06-20 0 条评论