This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
generated from spatie/package-skeleton-php
-
Notifications
You must be signed in to change notification settings - Fork 5
Engines
Greg Priday edited this page Jul 7, 2021
·
1 revision
Engines describe and provide access to the various models available in the API. You can refer to the Engines documentation to understand what engines are available and the differences between them.
use SiteOrigin\OpenAI\Client;
$client = new Client($_ENV['OPENAI_API_KEY']);
$engines = $client->engines()->list();
The shortened output of $engines
in JSON format:
(object) array(
'object' => 'list',
'data' =>
array (
0 =>
(object) array(
'id' => 'ada',
'object' => 'engine',
'created' => NULL,
'max_replicas' => NULL,
'owner' => 'openai',
'permissions' => NULL,
'ready' => true,
'ready_replicas' => NULL,
'replicas' => NULL,
),
1 =>
(object) array(
'id' => 'babbage',
'object' => 'engine',
'created' => NULL,
'max_replicas' => NULL,
'owner' => 'openai',
'permissions' => NULL,
'ready' => true,
'ready_replicas' => NULL,
'replicas' => NULL,
),
2 =>
(object) array(
'id' => 'content-filter-alpha',
'object' => 'engine',
'created' => NULL,
'max_replicas' => NULL,
'owner' => 'openai',
'permissions' => NULL,
'ready' => true,
'ready_replicas' => NULL,
'replicas' => NULL,
),
3 => (object) array( /* ... */ ),
4 => (object) array( /* ... */ ),
5 => (object) array( /* ... */ ),
6 => (object) array( /* ... */ ),
7 => (object) array( /* ... */ ),
),
)