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

Public Member Functions

 __construct ()
 Class constructor.
 
 add_authentication_headers (RequestInterface $request)
 Update a request to add any headers required by the provider.
 
 generate_userid (string $userid)
 Generate a user id.
 
 get_action_list ()
 Get the list of 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 this provider has the minimal configuration to work.
 
 is_request_allowed (aiactions\base $action)
 Check if the request is allowed by the rate limiter.
 

Public Attributes

string string $apiendpoint
 The Azure AI API endpoint, is different for each organisation.
 

Member Function Documentation

◆ add_authentication_headers()

aiprovider_azureai\provider::add_authentication_headers ( RequestInterface $request)

Update a request to add any headers required by the provider.

Parameters
Psr\Http\Message\RequestInterface$request
Return values
Psr\Http\Message\RequestInterface

◆ generate_userid()

aiprovider_azureai\provider::generate_userid ( string $userid)

Generate a user id.

This is a hash of the site id and user id, this means we can determine who made the request but don't pass any personal data to AzureAI.

Parameters
string$useridThe user id.
Return values
stringThe generated user id.

◆ get_action_list()

aiprovider_azureai\provider::get_action_list ( )

Get the list of actions that this provider supports.

Return values
arrayAn array of action class names.

Reimplemented from core_ai\provider.

◆ get_action_settings()

aiprovider_azureai\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 from core_ai\provider.

◆ get_name()

core_ai\provider::get_name ( )
inherited

Get the name of the provider.

Return values
stringThe name of the provider.

◆ get_sub_actions()

core_ai\provider::get_sub_actions ( string $classname)
inherited

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()

aiprovider_azureai\provider::is_provider_configured ( )

Check this provider has the minimal configuration to work.

Return values
boolReturn true if configured.

Reimplemented from core_ai\provider.

◆ is_request_allowed()

aiprovider_azureai\provider::is_request_allowed ( aiactions\base $action)

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 from core_ai\provider.


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