|
| __construct (int $contextid, protected int int $userid, protected string string $prompttext,) |
| Create a new instance of the generate_text action.
|
|
| get_configuration (string $name) |
| Get a configuration option.
|
|
| store (response_base $response) |
| Responsible for storing any action specific data in the database.
|
|
|
int readonly int | $timecreated |
| Timestamp the action object was created.
|
|
◆ __construct()
core_ai\aiactions\generate_text::__construct |
( |
int | $contextid, |
|
|
protected int int | $userid, |
|
|
protected string string | $prompttext ) |
Create a new instance of the generate_text action.
It’s responsible for performing any setup tasks, such as getting additional data from the database etc.
- Parameters
-
int | $contextid | The context id the action was created in. |
int | $userid | The user id making the request. |
string | $prompttext | The prompt text used to generate the image. |
- Parameters
-
$userid | The user id requesting the action. |
$prompttext | The prompt text used to generate the text |
◆ get_basename()
static core_ai\aiactions\base::get_basename |
( |
| ) |
|
|
staticinherited |
Get the basename of the class.
This is used to generate the action name and description.
- Return values
-
string | The basename of the class. |
◆ get_configuration()
core_ai\aiactions\base::get_configuration |
( |
string | $name | ) |
|
|
inherited |
Get a configuration option.
- Parameters
-
string | $name | The name of the configuration option to get. |
- Return values
-
mixed | The value of the configuration option. |
◆ get_description()
static core_ai\aiactions\base::get_description |
( |
| ) |
|
|
staticinherited |
Get the action description.
Defaults to the action description string.
- Return values
-
◆ get_name()
static core_ai\aiactions\base::get_name |
( |
| ) |
|
|
staticinherited |
Get the action name.
Defaults to the action name string.
- Return values
-
◆ get_response_classname()
static core_ai\aiactions\base::get_response_classname |
( |
| ) |
|
|
staticinherited |
Get the class name of the response object.
- Return values
-
string | The class name of the response object. |
◆ get_system_instruction()
static core_ai\aiactions\base::get_system_instruction |
( |
| ) |
|
|
staticinherited |
Get the system instruction for the action.
- Return values
-
string | The system instruction for the action. |
◆ get_tablename()
core_ai\aiactions\base::get_tablename |
( |
| ) |
|
|
protectedinherited |
Return the correct table name for the action.
- Return values
-
string | The correct table name for the action. |
◆ store()
core_ai\aiactions\generate_text::store |
( |
response_base | $response | ) |
|
Responsible for storing any action specific data in the database.
- Parameters
-
response_base | $response | The response object to store. |
- Return values
-
int | The id of the stored action. |
Reimplemented from core_ai\aiactions\base.
The documentation for this class was generated from the following file:
- ai/classes/aiactions/generate_text.php