Moodle PHP Documentation 4.5
Moodle 4.5.5+ (Build: 20250711) (ce34e8ff087)
core_ai\aiactions\base Class Reference
Inheritance diagram for core_ai\aiactions\base:
core_ai\aiactions\generate_image core_ai\aiactions\generate_text core_ai\aiactions\summarise_text

Public Member Functions

 __construct (protected int int $contextid,)
 Constructor for the class.
 
 get_configuration (string $name)
 Get a configuration option.
 
 store (response_base $response)
 Responsible for storing any action specific data in the database.
 

Static Public Member Functions

static get_basename ()
 Get the basename of the class.
 
static get_description ()
 Get the action description.
 
static get_name ()
 Get the action name.
 
static get_response_classname ()
 Get the class name of the response object.
 
static get_system_instruction ()
 Get the system instruction for the action.
 

Protected Member Functions

 get_tablename ()
 Return the correct table name for the action.
 

Protected Attributes

int readonly int $timecreated
 Timestamp the action object was created.
 

Constructor & Destructor Documentation

◆ __construct()

core_ai\aiactions\base::__construct ( protected int int $contextid)

Constructor for the class.

Parameters
int$contextidThe context ID where the action was created.
Parameters
$contextidThe context ID the action was created in

Member Function Documentation

◆ get_basename()

static core_ai\aiactions\base::get_basename ( )
static

Get the basename of the class.

This is used to generate the action name and description.

Return values
stringThe basename of the class.

◆ get_configuration()

core_ai\aiactions\base::get_configuration ( string $name)

Get a configuration option.

Parameters
string$nameThe name of the configuration option to get.
Return values
mixedThe value of the configuration option.

◆ get_description()

static core_ai\aiactions\base::get_description ( )
static

Get the action description.

Defaults to the action description string.

Return values
string

◆ get_name()

static core_ai\aiactions\base::get_name ( )
static

Get the action name.

Defaults to the action name string.

Return values
string

◆ get_response_classname()

static core_ai\aiactions\base::get_response_classname ( )
static

Get the class name of the response object.

Return values
stringThe class name of the response object.

◆ get_system_instruction()

static core_ai\aiactions\base::get_system_instruction ( )
static

Get the system instruction for the action.

Return values
stringThe system instruction for the action.

◆ get_tablename()

core_ai\aiactions\base::get_tablename ( )
protected

Return the correct table name for the action.

Return values
stringThe correct table name for the action.

◆ store()

core_ai\aiactions\base::store ( response_base $response)
abstract

Responsible for storing any action specific data in the database.

Parameters
response_base$responseThe response object to store.
Return values
intThe id of the stored action.

Reimplemented in core_ai\aiactions\generate_image, core_ai\aiactions\generate_text, and core_ai\aiactions\summarise_text.


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