Skip to content

Allow Files List to be paged #501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/Contracts/Resources/FilesContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @see https://platform.openai.com/docs/api-reference/files/list
*/
public function list(): ListResponse;
public function list(array $parameters = []): ListResponse;

Check failure on line 17 in src/Contracts/Resources/FilesContract.php

View workflow job for this annotation

GitHub Actions / Formats P8.1 - ubuntu-latest - prefer-lowest

Method OpenAI\Contracts\Resources\FilesContract::list() has parameter $parameters with no value type specified in iterable type array.

Check failure on line 17 in src/Contracts/Resources/FilesContract.php

View workflow job for this annotation

GitHub Actions / Formats P8.1 - ubuntu-latest - prefer-stable

Method OpenAI\Contracts\Resources\FilesContract::list() has parameter $parameters with no value type specified in iterable type array.

/**
* Returns information about a specific file.
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
*
* @see https://platform.openai.com/docs/api-reference/files/list
*/
public function list(): ListResponse
public function list(array $parameters = []): ListResponse

Check failure on line 24 in src/Resources/Files.php

View workflow job for this annotation

GitHub Actions / Formats P8.1 - ubuntu-latest - prefer-lowest

Method OpenAI\Resources\Files::list() has parameter $parameters with no value type specified in iterable type array.

Check failure on line 24 in src/Resources/Files.php

View workflow job for this annotation

GitHub Actions / Formats P8.1 - ubuntu-latest - prefer-stable

Method OpenAI\Resources\Files::list() has parameter $parameters with no value type specified in iterable type array.
{
$payload = Payload::list('files');
$payload = Payload::list('files', $parameters);

/** @var Response<array{object: string, data: array<int, array{id: string, object: string, created_at: int, bytes: ?int, filename: string, purpose: string, status: string, status_details: array<array-key, mixed>|string|null}>}> $response */
$response = $this->transporter->requestObject($payload);
Expand Down
Loading