validate_params {gemini.R} | R Documentation |
Validate Gemini API parameters
Description
Helper function to validate parameters for Gemini API calls
Usage
validate_params(
prompt,
model,
temperature = 1,
topP = 0.95,
topK = 40,
seed = 1234,
api_key = TRUE,
tokens = NULL
)
Arguments
prompt |
The prompt text to validate |
model |
The model name to validate |
temperature |
The temperature value to validate |
topP |
The topP value to validate |
topK |
The topK value to validate |
seed |
The seed value to validate |
api_key |
Whether to check for API key (TRUE/FALSE) |
tokens |
The tokens object for vertex API (optional, provide NULL if not applicable) |
Value
TRUE if all validations pass, otherwise the function stops execution with an error message
[Package gemini.R version 0.15.0 Index]