View source: R/call_model_api.R
validate_query | R Documentation |
Validates the structure and contents of the query based on the v2.0 model. This function checks that the query is a list and contains all required keys.
validate_query(query)
query |
A list containing the query data. |
Invisibly returns TRUE if validation passes. Throws an error If the query structure is invalid or missing required keys.
# Create a valid query
query <- get_valid_query()
validate_query(query) # Passes validation
# Example with invalid query (missing required key)
## Not run:
invalid_query <- list(inputs = list(), mode = "mean estimation")
validate_query(invalid_query) # Throws error for missing modality
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.