Register a custom LLM provider
Examples
if (FALSE) { # \dontrun{
register_custom_provider(
provider_name = "my_provider",
process_fn = function(prompt, model, api_key) {
# Custom implementation
response <- httr::POST(
url = "your_api_endpoint",
body = list(prompt = prompt),
encode = "json"
)
return(httr::content(response)$choices[[1]]$text)
}
)
} # }