From a853741b2667f264f21e4797dd96f154b50e2de0 Mon Sep 17 00:00:00 2001 From: Michael Hughes Date: Mon, 22 Apr 2024 14:37:46 +0100 Subject: [PATCH] Hard code system context id, rather than an id --- ai/classes/aiprovider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ai/classes/aiprovider.php b/ai/classes/aiprovider.php index b6bf2c4509863..8496d55309f84 100644 --- a/ai/classes/aiprovider.php +++ b/ai/classes/aiprovider.php @@ -234,7 +234,8 @@ public static function get_records($filters = [], $sort = '', $order = 'ASC', $s 'embeddingmodel' => '', 'completions' => 'chat', 'completionmodel' => 'llama2', - 'contextid' => 111, // Global AI Provider + 'contextid' => \context_system::instance()->id, + // 111, // Global AI Provider 'onlyenrolledcourses' => true, ]); array_push($records, $fake);