Provider
abstract class Provider implements Stringable, Provider
Methods
Get the name of the underlying AI provider.
Get the name of the underlying AI driver.
Get the credentials for the underlying AI provider.
Get the provider connection configuration other than the driver, key, and name.
Get a provider instance that sends the given HTTP headers with each request.
Run the given gateway call, dispatching the event built from its exception before rethrowing.
Format the given provider / model list.
Get provider and model pairs without discarding on-demand instances.
Get the serializable representation of the provider.
Restore the provider from its serialized representation.
Convert the provider to its string representation.
Details
at line 24
__construct(Gateway $gateway, array $config, Dispatcher $events)
Create a provider instance.
at line 34
string
name()
Get the name of the underlying AI provider.
at line 42
string
driver()
Get the name of the underlying AI driver.
at line 50
array
providerCredentials()
Get the credentials for the underlying AI provider.
at line 60
array
additionalConfiguration()
Get the provider connection configuration other than the driver, key, and name.
at line 72
Provider
withHeaders(array $headers)
| internal |
Get a provider instance that sends the given HTTP headers with each request.
at line 92
protected mixed
dispatchingFailure(Closure $call, Closure $failed)
Run the given gateway call, dispatching the event built from its exception before rethrowing.
at line 114
static array
formatProviderAndModelList(Provider|Lab|array|string $providers, string|null $model = null)
Format the given provider / model list.
at line 132
static array
providerAndModelPairs(Provider|Lab|array|string $providers, string|null $model = null)
| internal |
Get provider and model pairs without discarding on-demand instances.
at line 164
array
__serialize()
Get the serializable representation of the provider.
at line 174
void
__unserialize(array $data)
Restore the provider from its serialized representation.
at line 190
string
__toString()
Convert the provider to its string representation.