Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
AIHelper.php
1
<?php
2
3
namespace
Bitrix\Im\V2\Integration\AI
;
4
5
use
Bitrix\Main\Loader
;
6
7
class
AIHelper
8
{
9
public
const
CONTEXT_MODULE
=
'im'
;
10
public
const
CONTEXT_ID
=
'copilot_chat'
;
11
12
public
static
function
getProviderName
(): ?string
13
{
14
if
(!Loader::includeModule(
'ai'
))
15
{
16
return
null
;
17
}
18
19
if
(!isset(\
Bitrix
\AI\Engine::CATEGORIES[
'text'
]))
20
{
21
return
null
;
22
}
23
24
$engine = \Bitrix\AI\Engine::getByCategory(\
Bitrix
\AI\Engine::CATEGORIES[
'text'
], \
Bitrix
\AI\Context::getFake());
25
if
(isset($engine))
26
{
27
return
$engine->getIEngine()->getName();
28
}
29
30
return
null
;
31
}
32
}
Bitrix\Im\V2\Integration\AI\AIHelper
Definition
AIHelper.php:8
Bitrix\Im\V2\Integration\AI\AIHelper\CONTEXT_ID
const CONTEXT_ID
Definition
AIHelper.php:10
Bitrix\Im\V2\Integration\AI\AIHelper\getProviderName
static getProviderName()
Definition
AIHelper.php:12
Bitrix\Im\V2\Integration\AI\AIHelper\CONTEXT_MODULE
const CONTEXT_MODULE
Definition
AIHelper.php:9
Bitrix\Main\Loader
Definition
loader.php:12
Bitrix\Im\V2\Integration\AI
Definition
AIHelper.php:3
Bitrix
modules
im
lib
V2
Integration
AI
AIHelper.php
Создано системой
1.10.0