adachsoft / ai-integration-nvidia
NVIDIA Chat Completions tool-calling provider for AdachSoft AI Integration.
v0.1.0
2026-11-23 22:26 UTC
Requires
- php: ^8.3
- adachsoft/ai-integration: ^0.10
- guzzlehttp/guzzle: ^7.9
Requires (Dev)
- adachsoft/ai-conversation-model: ^0.2
- adachsoft/ai-integration-tester: ^0.5.2
- adachsoft/php-code-style: ^0.7.3
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.3
- phpunit/phpunit: ^12.4 || ^13.0
- rector/rector: ^2.8
- symplify/phpstan-rules: ^14.19
- vlucas/phpdotenv: ^5.6
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A Composer library that connects NVIDIA Chat Completions to the AdachSoft AI Integration tool-calling SPI.
Features
- Creates an NVIDIA-compatible tool-calling SPI with an optional custom HTTP client.
- Supports application-defined function tools and preserves NVIDIA
reasoning_contentin assistant history. - Provides NVIDIA-specific handling for common error responses.
Requirements and installation
Requires PHP 8.3 or later. Install with Composer:
composer require adachsoft/ai-integration-nvidia
Usage
Set NVIDIA_KEY in the process environment. Create the provider SPI and register it with the application's facade builder:
use AdachSoft\AiIntegrationNvidia\Config\NvidiaConfigVo;
use AdachSoft\AiIntegrationNvidia\NvidiaToolCallingChatSpiFactory;
use RuntimeException;
$apiKey = getenv('NVIDIA_KEY');
if (!is_string($apiKey) || $apiKey === '') {
throw new RuntimeException('NVIDIA_KEY is required.');
}
$spi = NvidiaToolCallingChatSpiFactory::create(new NvidiaConfigVo($apiKey));
$builder->withSpiProvider('nvidia', $spi);
The default endpoint is https://integrate.api.nvidia.com/v1/chat/completions. Supply an absolute HTTPS endpoint as the second NvidiaConfigVo argument to override it. Select the model in the consuming application's chat request.
See the usage example for a fuller integration snippet.