Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

PM84
Copy link

@PM84 PM84 commented Nov 4, 2024

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

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'),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
new lang_string('usemebis_ai_setting', 'qtype_aitext'),
new lang_string('use_local_ai_manager_setting', 'qtype_aitext'),

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'),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
new lang_string('usemebis_ai', 'qtype_aitext'),
new lang_string('use_local_ai_manager', 'qtype_aitext'),

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',
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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')) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (get_config('qtype_aitext', 'usemebisai')) {
if (get_config('qtype_aitext', 'uselocalaimanager')) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Author

@PM84 PM84 left a 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.

@marcusgreen
Copy link

This is excellent

@PhMemmel
Copy link
Member

PhMemmel commented Nov 5, 2024

closed in favor of #6

@PhMemmel PhMemmel closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants