adachsoft/ai-model-list-provider-nvidia
Composer 安装命令:
composer require adachsoft/ai-model-list-provider-nvidia
包简介
ai-model-list-provider-nvidia
README 文档
README
This package provides an NVIDIA implementation of the ai-model-list SPI. It exposes a simple PHP API for listing available NVIDIA AI models using the unified AiModelProvider interface.
Installation
Install via Composer:
composer require adachsoft/ai-model-list-provider-nvidia
Requirements
- PHP >= 8.3
adachsoft/ai-model-list(installed automatically as a dependency)- An NVIDIA API key
Usage
use AdachSoft\AIModelList\Spi\AiModelProvider\Model\ProviderId;
use AdachSoft\AiModelListProviderNvidia\Factory\NvidiaAiModelProviderFactory;
$apiKey = getenv('NVIDIA_KEY'); // or load from your own configuration/.env
$factory = new NvidiaAiModelProviderFactory();
$provider = $factory->create($apiKey);
$providerId = new ProviderId('nvidia');
$models = $provider->listModels($providerId);
foreach ($models as $model) {
echo $model->getName() . PHP_EOL;
}
Testing
To run the test suite:
composer install
vendor/bin/phpunit
There is also an optional production test that can hit the real NVIDIA API. It is marked with the production PHPUnit group and requires a valid NVIDIA_KEY in your environment or .env file.
vendor/bin/phpunit --group production
Versioning
This library follows Semantic Versioning.
License
MIT License. See the LICENSE file for details.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-29