Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add missing filename property to OutputMessageContentOutputTextAnnota…
…tionsContainerFile
  • Loading branch information
knash94 committed Oct 13, 2025
commit 9f2b825dd97e66e2d5263fea862cdb8a5ffc299f
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use OpenAI\Testing\Responses\Concerns\Fakeable;

/**
* @phpstan-type ContainerFileType array{file_id: string, type: 'container_file_citation', text?: string, start_index?: int, end_index?: int}
* @phpstan-type ContainerFileType array{file_id: string, filename: string, type: 'container_file_citation', text?: string, start_index?: int, end_index?: int}
*
* @implements ResponseContract<ContainerFileType>
*/
Expand All @@ -27,6 +27,7 @@ final class OutputMessageContentOutputTextAnnotationsContainerFile implements Re
*/
private function __construct(
public readonly string $fileId,
public readonly string $filename,
public readonly string $type,
public readonly ?string $text,
public readonly ?int $startIndex,
Expand All @@ -40,6 +41,7 @@ public static function from(array $attributes): self
{
return new self(
fileId: $attributes['file_id'],
filename: $attributes['filename'],
type: $attributes['type'],
text: $attributes['text'] ?? null,
startIndex: $attributes['start_index'] ?? null,
Expand All @@ -54,6 +56,7 @@ public function toArray(): array
{
$result = [
'file_id' => $this->fileId,
'filename' => $this->filename,
'type' => $this->type,
];

Expand Down