1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
controller.php
См. документацию.
1<?php
2
4
5use Bitrix\AI\Context;
6use Bitrix\AI\Engine;
9
10final class Controller
11{
12 public const TEXT_CATEGORY = 'text';
13 public const IMAGE_CATEGORY = 'image';
14
15 public static function isAvailable(string $category, string $contextId = ''): bool
16 {
17 if (!Loader::includeModule('ai'))
18 {
19 return false;
20 }
21
22 $engine = Engine::getByCategory($category, new Context('sender', $contextId));
23 if (is_null($engine))
24 {
25 return false;
26 }
27
28 return Option::get('sender', 'ai_base_enabled', 'N') === 'Y';
29 }
30}
Определения loader.php:13
static isAvailable(string $category, string $contextId='')
Определения controller.php:15
Определения culture.php:9
$engine
Определения options.php:121