3declare(strict_types=1);
5namespace Bitrix\Im\V2\Analytics;
7use Bitrix\Im\V2\Analytics\Event\ChatEvent;
8use Bitrix\Im\V2\Analytics\Event\CopilotEvent;
9use Bitrix\Im\V2\Analytics\Event\Event;
11use Bitrix\Main\Result;
26 ->createCopilotEvent(self::GENERATE, $promptCode)
30 ->createCopilotEvent(self::RECEIVED_RESULT, $promptCode)
39 $this->
async(
function () use ($oldRole) {
41 (
new ChatEvent(self::CHANGE_ROLE, $this->chat, $this->userId))
43 ->setP3(
'oldRole_' . Event::convertUnderscore($oldRole))
51 $this->
async(
function () use ($oldEngineName) {
52 (
new ChatEvent(self::CHANGE_MODEL, $this->chat, $this->userId))
54 ->setP3(
'oldProvider_' . Event::convertUnderscore($oldEngineName))
63 ->createCopilotEvent(self::ADD_USER)
71 ->createCopilotEvent(self::DELETE_USER)
78 ?
string $promptCode =
null,
86 return (
new CopilotEvent($eventName, $this->chat, $this->userId))
createCopilotEvent(string $eventName, ?string $promptCode=null,)
addChangeRole(string $oldRole)
addChangeEngine(string $oldEngineName)
addGenerate(Result $result, ?string $promptCode=null)
setCopilotP1(?string $promptCode)