Skip to contents

Centralizes environment/config access and so that API calls stay minimal and easy to reason about. Keeping this logic here avoids scattering env-var assumptions or image resizing across multiple files, making future maintenance safer.

Usage

..api_gemini_key()

.get_gemini_cfg()

.def_max_out()

.gemini_resp_check(resp, ml, cache = NULL)

.gemini_resp_parse(r, max_out = NULL)

Value

Character string with modelVersion and usageMetadata attributes

Functions

  • ..api_gemini_key(): helper to retrieve api key

  • .get_gemini_cfg(): helper to retrieve default values for api requests

  • .def_max_out(): helper to retrieve max output tokens default

  • .gemini_resp_check(): Validate Gemini HTTP response and surface context

  • .gemini_resp_parse(): Parse the response from Gemini with metadata