validate_params | R Documentation |
Helper function to validate parameters for Gemini API calls
validate_params(
prompt,
model,
temperature = 1,
topP = 0.95,
topK = 40,
seed = 1234,
api_key = TRUE,
tokens = NULL
)
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) |
TRUE if all validations pass, otherwise the function stops execution with an error message
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.