interface TextProvider 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
prompt(AgentPrompt $prompt)

Invoke the given agent.

stream(AgentPrompt $prompt)

Stream the response from the given agent.

useTextGateway(StepTextGateway $gateway)

Set the provider's text gateway.

textGenerationLoop()

Get the multi-step text generation loop wrapping the provider's text gateway.

string
defaultTextModel()

Get the name of the default text model.

string
cheapestTextModel()

Get the name of the cheapest text model.

string
smartestTextModel()

Get the name of the smartest text 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 19
AgentResponse prompt(AgentPrompt $prompt)

Invoke the given agent.

Parameters

AgentPrompt $prompt

Return Value

AgentResponse

at line 24
StreamableAgentResponse stream(AgentPrompt $prompt)

Stream the response from the given agent.

Parameters

AgentPrompt $prompt

Return Value

StreamableAgentResponse

at line 29
TextProvider useTextGateway(StepTextGateway $gateway)

Set the provider's text gateway.

Parameters

StepTextGateway $gateway

Return Value

TextProvider

at line 35
TextGenerationLoop textGenerationLoop()

Get the multi-step text generation loop wrapping the provider's text gateway.

Return Value

TextGenerationLoop

at line 40
string defaultTextModel()

Get the name of the default text model.

Return Value

string

at line 45
string cheapestTextModel()

Get the name of the cheapest text model.

Return Value

string

at line 50
string smartestTextModel()

Get the name of the smartest text model.

Return Value

string