Moodle PHP Documentation 4.5
Moodle 4.5.5+ (Build: 20250711) (ce34e8ff087)
core_ai\provider Class Reference
Inheritance diagram for core_ai\provider:
aiprovider_azureai\provider aiprovider_openai\provider

Public Member Functions

 get_action_list ()
 Get the actions that this provider supports.
 
 get_action_settings (string $action, admin_root $ADMIN, string $section, bool $hassiteconfig)
 Get any action settings for this provider.
 
 get_name ()
 Get the name of the provider.
 
 get_sub_actions (string $classname)
 Given an action class name, return an array of sub actions that this provider supports.
 
 is_provider_configured ()
 Check if a provider has the minimal configuration to work.
 
 is_request_allowed (aiactions\base $action)
 Check if the request is allowed by the rate limiter.
 

Member Function Documentation

◆ get_action_list()

core_ai\provider::get_action_list ( )
abstract

Get the actions that this provider supports.

Returns an array of action class names.

Return values
arrayAn array of action class names.

Reimplemented in aiprovider_azureai\provider, and aiprovider_openai\provider.

◆ get_action_settings()

core_ai\provider::get_action_settings ( string $action,
admin_root $ADMIN,
string $section,
bool $hassiteconfig )

Get any action settings for this provider.

Parameters
string$actionThe action class name.
admin_root$ADMINThe admin root object.
string$sectionThe section name.
bool$hassiteconfigWhether the current user has moodle/site:config capability.
Return values
arrayAn array of settings.

Reimplemented in aiprovider_azureai\provider, and aiprovider_openai\provider.

◆ get_name()

core_ai\provider::get_name ( )

Get the name of the provider.

Return values
stringThe name of the provider.

◆ get_sub_actions()

core_ai\provider::get_sub_actions ( string $classname)

Given an action class name, return an array of sub actions that this provider supports.

Parameters
string$classnameThe action class name.
Return values
arrayAn array of supported sub actions.

◆ is_provider_configured()

core_ai\provider::is_provider_configured ( )

Check if a provider has the minimal configuration to work.

Return values
boolReturn true if configured.

Reimplemented in aiprovider_azureai\provider, and aiprovider_openai\provider.

◆ is_request_allowed()

core_ai\provider::is_request_allowed ( aiactions\base $action)
abstract

Check if the request is allowed by the rate limiter.

Parameters
aiactions::base$actionThe action to check.
Return values
array|boolTrue on success, array of error details on failure.

Reimplemented in aiprovider_azureai\provider, and aiprovider_openai\provider.


The documentation for this class was generated from the following file: