interface EmbeddingProvider implements Provider

Methods

string
name()

Get the name of the underlying AI provider.

from  Provider
string
driver()

Get the name of the underlying AI driver.

from  Provider
array
providerCredentials()

Get the credentials for the underlying AI provider.

from  Provider
array
additionalConfiguration()

Get the provider connection configuration other than the driver, key, and name.

from  Provider
withHeaders(array $headers)

Get a provider instance that sends the given HTTP headers with each request.

from  Provider
embeddings(array $inputs, int|null $dimensions = null, string|null $model = null, int $timeout = 30, array $providerOptions = [])

Get embedding vectors representing the given inputs.

embeddingGateway()

Get the provider's embedding gateway.

useEmbeddingGateway(EmbeddingGateway $gateway)

Set the provider's embedding gateway.

string
defaultEmbeddingsModel()

Get the name of the default embeddings model.

int
defaultEmbeddingsDimensions()

Get the default dimensions of the default embeddings model.

Details

in Provider at line 12
string name()

Get the name of the underlying AI provider.

Return Value

string

in Provider at line 17
string driver()

Get the name of the underlying AI driver.

Return Value

string

in Provider at line 24
array providerCredentials()

Get the credentials for the underlying AI provider.

Return Value

array

in Provider at line 31
array additionalConfiguration()

Get the provider connection configuration other than the driver, key, and name.

Return Value

array

in Provider at line 40
Provider withHeaders(array $headers)

internal  
 

Get a provider instance that sends the given HTTP headers with each request.

Parameters

array $headers

Return Value

Provider

at line 23
EmbeddingsResponse embeddings(array $inputs, int|null $dimensions = null, string|null $model = null, int $timeout = 30, array $providerOptions = [])

Get embedding vectors representing the given inputs.

Parameters

array $inputs
int|null $dimensions
string|null $model
int $timeout
array $providerOptions

Return Value

EmbeddingsResponse

at line 28
EmbeddingGateway embeddingGateway()

Get the provider's embedding gateway.

Return Value

EmbeddingGateway

at line 33
EmbeddingProvider useEmbeddingGateway(EmbeddingGateway $gateway)

Set the provider's embedding gateway.

Parameters

EmbeddingGateway $gateway

Return Value

EmbeddingProvider

at line 39
string defaultEmbeddingsModel()

Get the name of the default embeddings model.

Return Value

string

at line 44
int defaultEmbeddingsDimensions()

Get the default dimensions of the default embeddings model.

Return Value

int