-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Moodle 4.5 Core AI subsystem #5
Conversation
Conditionally use tool_aiconnect or moodle 4.5 coreai subsystem A new function called perform_request checks the usemebisai setting and if it is set then the mebis-lp ai subsystem is used, otherwise the Core AI subsystem is used. The tool_aiconnect approach has been removed
$settings->add(new admin_setting_configcheckbox( | ||
'qtype_aitext/usemebisai', | ||
new lang_string('usemebis_ai', 'qtype_aitext'), | ||
new lang_string('usemebis_ai_setting', 'qtype_aitext'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new lang_string('usemebis_ai_setting', 'qtype_aitext'), | |
new lang_string('use_local_ai_manager_setting', 'qtype_aitext'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like and approve
@@ -66,6 +66,12 @@ | |||
new lang_string('responseformat_setting', 'qtype_aitext'), | |||
0, ['plain' => 'plain', 'editor' => 'editor', 'monospaced' => 'monospaced'] | |||
)); | |||
$settings->add(new admin_setting_configcheckbox( | |||
'qtype_aitext/usemebisai', | |||
new lang_string('usemebis_ai', 'qtype_aitext'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new lang_string('usemebis_ai', 'qtype_aitext'), | |
new lang_string('use_local_ai_manager', 'qtype_aitext'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this as well, and approve
@@ -66,6 +66,12 @@ | |||
new lang_string('responseformat_setting', 'qtype_aitext'), | |||
0, ['plain' => 'plain', 'editor' => 'editor', 'monospaced' => 'monospaced'] | |||
)); | |||
$settings->add(new admin_setting_configcheckbox( | |||
'qtype_aitext/usemebisai', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'qtype_aitext/usemebisai', | |
'qtype_aitext/uselocalaimanager', |
@@ -143,6 +143,41 @@ public function compute_final_grade($responses, $totaltries) { | |||
public function apply_attempt_state(question_attempt_step $step) { | |||
$this->step = $step; | |||
} | |||
/** | |||
* Call the llm using either the 4.5 core api | |||
* or the the mebis ai depending on the usemebisai |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* or the the mebis ai depending on the usemebisai | |
* or the the mebis ai depending on the uselocalaimanager |
* @return string $response | ||
*/ | ||
public function perform_request(string $prompt, string $purpose): string { | ||
if (get_config('qtype_aitext', 'usemebisai')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (get_config('qtype_aitext', 'usemebisai')) { | |
if (get_config('qtype_aitext', 'uselocalaimanager')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Marcus,
we would like the local_ai_manager itself to be named there rather than “mebis”.
Apart from that, I don't see any problems that would prevent us from merging our forums.
However, we will make a few minor changes. We can then contribute them directly to you.
This is excellent |
closed in favor of #6 |
Conditionally use tool_aiconnect or moodle 4.5 coreai subsystem A new function called perform_request checks the usemebisai setting and if it is set then the mebis-lp ai subsystem is used, otherwise the Core AI subsystem is used. The tool_aiconnect approach has been removed