1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс Request

Открытые члены

 __construct (int $generationId, int $stepId)
 send (Prompt $prompt, IConnector $connector)
 setApplied ()
 saveResult (array $result)
 saveError (Generation\Error $error)
 setDeleted ()
 getGenerationId ()
 getResult ()
 getError ()
 isReceived ()
 isApplied ()
 getId ()

Открытые статические члены

static getByGeneration (int $generationId, int $stepId)
static getByHash (string $hash)
static getById (int $id)

Подробное описание

См. определение в файле Request.php строка 23

Конструктор(ы)

◆ __construct()

__construct ( int $generationId,
int $stepId )

См. определение в файле Request.php строка 42

Методы

◆ getByGeneration()

getByGeneration ( int $generationId,
int $stepId )
static
Аргументы
int$generationId
int$stepId
Возвращает
array<Request> - array of exists requests

См. определение в файле Request.php строка 347

◆ getByHash()

getByHash ( string $hash)
static

См. определение в файле Request.php строка 359

◆ getById()

getById ( int $id)
static

См. определение в файле Request.php строка 371

◆ getError()

getError ( )

If request finish with error - get error DTO

Возвращает
?Generation\Error

См. определение в файле Request.php строка 310

◆ getGenerationId()

getGenerationId ( )

Return ID of current generation

Возвращает
int

См. определение в файле Request.php строка 292

◆ getId()

getId ( )

ID in DB

Возвращает
int|null

См. определение в файле Request.php строка 337

◆ getResult()

getResult ( )

If request received - return result data. Else - return null

Возвращает
array|null

См. определение в файле Request.php строка 301

◆ isApplied()

isApplied ( )

If request answer was applied to step

Возвращает
bool

См. определение в файле Request.php строка 328

◆ isReceived()

isReceived ( )

If request receive answer

Возвращает
bool

См. определение в файле Request.php строка 319

◆ saveError()

saveError ( Generation\Error $error)

Save error code and message

Аргументы
Generation\Error$error
Возвращает
bool

См. определение в файле Request.php строка 212

◆ saveResult()

saveResult ( array $result)

Save result of AI request

Аргументы
array$result- data array
Возвращает
bool

См. определение в файле Request.php строка 193

◆ send()

send ( Prompt $prompt,
IConnector $connector )

Send request to AI provider

Аргументы
Prompt$prompt
IConnector$connector
Возвращает
bool
Исключения
GenerationException

См. определение в файле Request.php строка 55

◆ setApplied()

setApplied ( )

См. определение в файле Request.php строка 158

◆ setDeleted()

setDeleted ( )

См. определение в файле Request.php строка 226


Объявления и описания членов класса находятся в файле:
  • C:/bitrix/modules/landing/lib/Copilot/Generation/Request.php