View source: R/api_diagnostics.R
| check_api | R Documentation |
Tests connectivity to a specific LLM, provider, or URL. This is helpful for diagnosing network issues, DNS failures, or SSL problems.
check_api(model = NULL, url = NULL, registry = NULL)
model |
Optional. A |
url |
Optional. A specific URL to test. |
registry |
Optional ProviderRegistry to use if |
A list containing diagnostic results (invisible).
if (interactive()) {
# Test by passing a URL directly
check_api(url = "https://api.openai.com/v1")
# Test a model directly
model <- create_openai()$language_model("gpt-4o")
check_api(model)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.