Copied!

AiModelProviderInterface

AiModelProviderInterface.php : 18
Interface

Declares the AI models an action handler can use. Models of all providers supporting a handler are combined, so a model identifier must be unique across them.

Constants

publicSERVICE_TAG

AiModelProviderInterface.php : 20
public string SERVICE_TAG = 'ibexa.connector_ai.ai_model_provider'

Methods

publicgetDefaultModel()

AiModelProviderInterface.php : 41

Identifier of the model used when none is selected, or null to leave the choice to other providers.

public getDefaultModel(string $actionHandlerIdentifier) : string|null

One of the providers supporting the handler has to name it.

Parameters

Name Type Default value Description
$actionHandlerIdentifier string - -

Return values

string|null

publicgetHandlerOptionDefinitions()

AiModelProviderInterface.php : 35

Options the handler accepts whichever model is selected (e.g. a prompt). They are merged with {@see AiModel::$optionDefinitions} of the selected model. Defining the same option in both is an error.

public getHandlerOptionDefinitions(string $actionHandlerIdentifier) : OptionDefinitionCollection

OptionDefinitionProviderInterface does not add options here, it extends the catalog the connector picks model options from.

Parameters

Name Type Default value Description
$actionHandlerIdentifier string - -

Return values

OptionDefinitionCollection

publicgetModels()

AiModelProviderInterface.php : 27
public getModels(string $actionHandlerIdentifier) : iterable<string|int, AiModel>

Parameters

Name Type Default value Description
$actionHandlerIdentifier string - -

Return values

iterable<string|int, AiModel>

publicsupportsActionHandler()

AiModelProviderInterface.php : 22
public supportsActionHandler(string $actionHandlerIdentifier) : bool

Parameters

Name Type Default value Description
$actionHandlerIdentifier string - -

Return values

bool