Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
core_ai\aiactions\responses\response_explain_text Class Reference
Inheritance diagram for core_ai\aiactions\responses\response_explain_text:
core_ai\aiactions\responses\response_base

Public Member Functions

 __construct (bool $success, int $errorcode=0, string $error='', string $errormessage='',)
 Constructor.
 
 get_actionname ()
 Get the name of the action that was processed.
 
 get_error ()
 Get the error name.
 
 get_errorcode ()
 Get the error code.
 
 get_errormessage ()
 Get the error message.
 
 get_model_used ()
 Get the model used to generate the response (if available).
 
 get_response_data ()
 Get the response data returned by the AI provider.
 
 get_success ()
 Get the success status of the action.
 
 get_timecreated ()
 Get the timestamp of when the response was created.
 
 set_response_data (array $response)
 Set the response data returned by the AI provider.
 

Constructor & Destructor Documentation

◆ __construct()

core_ai\aiactions\responses\response_explain_text::__construct ( bool $success,
int $errorcode = 0,
string $error = '',
string $errormessage = '' )

Constructor.

Parameters
bool$successThe success status of the action.
int$errorcodeError code. Must exist if success is false.
string$errorError name. Must exist if success is false
string$errormessageError message. Must exist if success is false

Member Function Documentation

◆ get_actionname()

core_ai\aiactions\responses\response_base::get_actionname ( )
inherited

Get the name of the action that was processed.

Return values
string

◆ get_error()

core_ai\aiactions\responses\response_base::get_error ( )
inherited

Get the error name.

Return values
string

◆ get_errorcode()

core_ai\aiactions\responses\response_base::get_errorcode ( )
inherited

Get the error code.

Return values
int

◆ get_errormessage()

core_ai\aiactions\responses\response_base::get_errormessage ( )
inherited

Get the error message.

Return values
string

◆ get_model_used()

core_ai\aiactions\responses\response_base::get_model_used ( )
inherited

Get the model used to generate the response (if available).

Return values
?string

◆ get_response_data()

core_ai\aiactions\responses\response_explain_text::get_response_data ( )

Get the response data returned by the AI provider.

Return values
array

Reimplemented from core_ai\aiactions\responses\response_base.

◆ get_success()

core_ai\aiactions\responses\response_base::get_success ( )
inherited

Get the success status of the action.

Return values
bool

◆ get_timecreated()

core_ai\aiactions\responses\response_base::get_timecreated ( )
inherited

Get the timestamp of when the response was created.

Return values
int

◆ set_response_data()

core_ai\aiactions\responses\response_explain_text::set_response_data ( array $response)

Set the response data returned by the AI provider.

Parameters
array$responseThe response data returned by the AI provider.

Reimplemented from core_ai\aiactions\responses\response_base.


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