| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 3 declare (strict_types=1); 4 namespace WordPress\AiClient\Results\Enums; 5 6 use WordPress\AiClient\Common\AbstractEnum; 7 /** 8 * Enum for finish reasons of AI generation. 9 * 10 * @since 0.1.0 11 * 12 * @method static self stop() Creates an instance for STOP reason. 13 * @method static self length() Creates an instance for LENGTH reason. 14 * @method static self contentFilter() Creates an instance for CONTENT_FILTER reason. 15 * @method static self toolCalls() Creates an instance for TOOL_CALLS reason. 16 * @method static self error() Creates an instance for ERROR reason. 17 * @method bool isStop() Checks if the reason is STOP. 18 * @method bool isLength() Checks if the reason is LENGTH. 19 * @method bool isContentFilter() Checks if the reason is CONTENT_FILTER. 20 * @method bool isToolCalls() Checks if the reason is TOOL_CALLS. 21 * @method bool isError() Checks if the reason is ERROR. 22 */ 23 class FinishReasonEnum extends AbstractEnum 24 { 25 /** 26 * Generation stopped naturally. 27 */ 28 public const STOP = 'stop'; 29 /** 30 * Generation stopped due to max length. 31 */ 32 public const LENGTH = 'length'; 33 /** 34 * Generation stopped due to content filter. 35 */ 36 public const CONTENT_FILTER = 'content_filter'; 37 /** 38 * Generation stopped to make tool calls. 39 */ 40 public const TOOL_CALLS = 'tool_calls'; 41 /** 42 * Generation stopped due to error. 43 */ 44 public const ERROR = 'error'; 45 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Sat Jun 13 09:38:55 2026 | Cross-referenced by PHPXref |