Search by

adachsoft / ai-integration-nvidia

Arkadiusz Adach

NVIDIA Chat Completions tool-calling provider for AdachSoft AI Integration.

Package info

gitlab.com/a.adach/ai-integration-nvidia

Issues

pkg:composer/adachsoft/ai-integration-nvidia

Statistics

Installs: 19

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-11-23 22:26 UTC

This package is auto-updated.

Last update: 2026-11-23 21:28:57 UTC


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_content in 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.