diff --git a/classes/manager.php b/classes/manager.php index 96b7ead..c48eddf 100644 --- a/classes/manager.php +++ b/classes/manager.php @@ -146,7 +146,7 @@ public function perform_request(string $prompttext, array $options = []): prompt 'local_ai_manager', [ 'count' => $this->configmanager->get_max_requests($this->purpose, $userinfo->get_role()), - 'period' => $period + 'period' => $period, ] ), '' @@ -188,7 +188,7 @@ public function perform_request(string $prompttext, array $options = []): prompt [ 'component' => $options['component'], 'contextid' => $options['contextid'], - 'itemid' => $options['itemid'] + 'itemid' => $options['itemid'], ] )) { $existingitemid = $options['itemid']; diff --git a/purposes/genai/classes/purpose.php b/purposes/genai/classes/purpose.php index 0e936ba..2791f77 100644 --- a/purposes/genai/classes/purpose.php +++ b/purposes/genai/classes/purpose.php @@ -48,7 +48,7 @@ public function get_request_options(array $options): array { if (array_key_exists('messages', $options)) { $messages = []; - foreach ($options['messages'] as $message) { + foreach ($options['messages'] as $message) { switch ($message['role']) { case 'user': $messages[] = ['sender' => 'user', 'message' => $message['content']]; diff --git a/tools/ollama/classes/connector.php b/tools/ollama/classes/connector.php index 0e271dc..424d793 100644 --- a/tools/ollama/classes/connector.php +++ b/tools/ollama/classes/connector.php @@ -44,7 +44,7 @@ public function get_models_by_purpose(): array { 'mixtral', 'dolphin-mixtral', 'llava', - 'tinyllama' + 'tinyllama', ]; return [ 'chat' => $textmodels,