$citations * only sources that were actually provided to the model and referenced in the answer */ public function __construct( public readonly string $requestId, public readonly string $text, public readonly bool $cancelled, public readonly bool $replayed, public readonly array $citations = [], public readonly bool $abstained = false, ) { } /** @return array */ public function toArray(): array { return [ 'request_id' => $this->requestId, 'text' => $this->text, 'cancelled' => $this->cancelled, 'replayed' => $this->replayed, 'abstained' => $this->abstained, 'citations' => array_map(static fn(array $c): array => [ 'n' => $c['n'], 'title' => $c['title'], 'url' => $c['url'], 'anchor' => $c['anchor'], // Provenance is verified; whether the source supports the claim is not evaluated. 'provenance' => $c['provenance'] ?? 'verified', 'support' => 'not_evaluated', 'stale' => $c['stale'] ?? false, ], $this->citations), ]; } }