$client = new \\PhpFanatic\clarifAI\ImageClient([key]);
"autoload": {
"psr-4": {
"PhpFanatic\\clarifAI\\": "src"
}
}
composer dump-autoload
$bot = new \TelegramBot\Api\Client($token, null);
composer require clarifai/clarifai-php
use Clarifai\API\ClarifaiClient;
use Clarifai\DTOs\Inputs\ClarifaiURLImage;
use Clarifai\DTOs\Outputs\ClarifaiOutput;
use Clarifai\DTOs\Predictions\Concept;
use Clarifai\DTOs\Searches\SearchBy;
use Clarifai\DTOs\Searches\SearchInputsResult;
use Clarifai\DTOs\Models\ModelType;
// Skip the argument to fetch the key from the CLARIFAI_API_KEY env. variable
$client = new ClarifaiClient('YOUR_API_KEY');
$bot = new \TelegramBot\Api\Client($token, null);
так может мне на сервере выставить, что бы заработало
"phpfanatic/clarifai": "^2.0"
. Всё больше ничего в composer.json писать не надо.use PhpFanatic\clarifAI\ImageClient;
$test = new ImageClient('asdfaefad');
"phpfanatic/clarifai": "^2.0"
и выполняете в консоли, в корне приложения команду composer update
и нужный пакет устанавливается. Разве может быть решением уровень ошибок, если он класс не видит просто?