PHP code example of symfony / models-dev
1. Go to this page and download the library: Download symfony/models-dev library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
symfony / models-dev example snippets
$models = json_decode(
file_get_contents(__DIR__.'/vendor/symfony/models-dev/models-dev.json'),
true,
);
// List all providers
$providers = array_keys($models);
// Get all models for a given provider
$openaiModels = $models['openai']['models'];