| ProviderBase | R Documentation |
Abstract base class for Grounded AI Advisor providers. Defines the uniform ‘complete(prompt, schema, ...)' contract, mirroring the package’s 'ModelBase' / 'TestStatisticBase' strategy-pattern idiom. Concrete providers ('CustomProvider', and the HTTP 'OpenAICompatProvider' / 'AnthropicProvider' delivered in later plans) inherit from this base and implement 'complete()'.
'ProviderBase' itself is abstract: calling 'complete()' on it errors. It stores only non-secret configuration ('model', 'base_url'); API keys are NEVER read at construction – they are resolved at call time inside each concrete provider's 'complete()'.
modelCharacter model identifier (or NULL for provider default).
base_urlCharacter base URL for HTTP providers (or NULL).
ProviderBase$new()Construct a provider. Stores non-secret config only; never reads or stores API keys (keys are resolved at call time).
ProviderBase$new(model = NULL, base_url = NULL, ...)
modelOptional character model identifier.
base_urlOptional character base URL (HTTP providers only).
...Ignored; accepted for subclass forward-compatibility.
ProviderBase$complete()Complete a prompt. Abstract on the base class – concrete providers override this.
ProviderBase$complete(prompt, schema = NULL, ...)
promptCharacter prompt to send to the provider.
schemaOptional structured-output schema (list) or NULL.
...Provider-specific arguments.
An 'es_provider_response' S3 list with fields:
source (character provider label),
is_deterministic (always FALSE for provider output),
text (character completion, or NA_character_ on failure),
error (NULL on success, character reason on failure).
These field names match the Phase 5 es_advice shape so the Phase 7
wrapper slots in trivially.
ProviderBase$clone()The objects of this class are cloneable with this method.
ProviderBase$clone(deep = FALSE)
deepWhether to make a deep clone.
Other eventstudy-advisor:
AnthropicProvider,
CustomProvider,
OpenAICompatProvider,
es_advise(),
es_diagnostics(),
es_kb(),
flag_robustness(),
provider(),
recommend_stat()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.