uploadFile()、listFiles()、retrieveFile()、retrieveFileContent()
例
listFiles()はSDKから呼び出せますが、共有Gatewayキーでは現在GET /filesがfile_list_not_supported_with_shared_gateway_keyを返します
アップロードしたファイルIDを保存し、個別に取得してください。Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
PHP SDKでファイルのアップロード、メタデータの取得、内容の取得を行います。
uploadFile()、listFiles()、retrieveFile()、retrieveFileContent()
<?php
require 'vendor/autoload.php';
use Phaseo\Sdk\Phaseo;
$apiKey = getenv('PHASEO_API_KEY');
$client = new Phaseo(apiKey: $apiKey);
$uploaded = $client->uploadFile([
'purpose' => 'batch',
'file' => 'data:application/json;base64,eyJ0ZXN0Ijp0cnVlfQ==',
]);
$file = $client->retrieveFile('file_123');
$content = $client->retrieveFileContent('file_123');
listFiles()はSDKから呼び出せますが、共有Gatewayキーでは現在GET /filesがfile_list_not_supported_with_shared_gateway_keyを返します
アップロードしたファイルIDを保存し、個別に取得してください。