| [ 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\Contracts; 5 6 use WordPress\AiClient\Providers\DTO\ProviderMetadata; 7 use WordPress\AiClient\Providers\Models\DTO\ModelMetadata; 8 use WordPress\AiClient\Results\DTO\TokenUsage; 9 /** 10 * Interface for AI operation results. 11 * 12 * Results contain the output from AI operations along with metadata 13 * such as token usage and provider-specific information. 14 * 15 * @since 0.1.0 16 */ 17 interface ResultInterface 18 { 19 /** 20 * Gets the result ID. 21 * 22 * @since 0.1.0 23 * 24 * @return string The unique result identifier. 25 */ 26 public function getId(): string; 27 /** 28 * Gets token usage information. 29 * 30 * @since 0.1.0 31 * 32 * @return TokenUsage Token usage statistics. 33 */ 34 public function getTokenUsage(): TokenUsage; 35 /** 36 * Gets the provider metadata. 37 * 38 * @since 0.1.0 39 * 40 * @return ProviderMetadata The provider metadata. 41 */ 42 public function getProviderMetadata(): ProviderMetadata; 43 /** 44 * Gets the model metadata. 45 * 46 * @since 0.1.0 47 * 48 * @return ModelMetadata The model metadata. 49 */ 50 public function getModelMetadata(): ModelMetadata; 51 /** 52 * Gets provider-specific metadata. 53 * 54 * @since 0.1.0 55 * 56 * @return array<string, mixed> Provider metadata. 57 */ 58 public function getAdditionalData(): array; 59 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Sat Jun 13 09:38:55 2026 | Cross-referenced by PHPXref |