Documentation
¶
Overview ¶
Package nvidia implements a Glue provider for the NVIDIA build inference API (https://build.nvidia.com), which exposes an OpenAI-compatible chat-completions endpoint at https://integrate.api.nvidia.com/v1.
It supports text streaming, OpenAI-shape tool calling, and reasoning content deltas. Models are addressed by their build.nvidia.com path, for example "moonshotai/kimi-k2.6" or "meta/llama-3.3-70b-instruct".
Index ¶
Constants ¶
const DefaultModel = "moonshotai/kimi-k2.6"
DefaultModel is the registry-level default model for this provider. Kimi K2.6 on NVIDIA build is currently the strongest free model exposed through build.nvidia.com.
const EnvKey = "NVIDIA_API_KEY"
EnvKey is the environment variable the provider reads when Options.APIKey is empty. Exposed so the providers registry and downstream agents can probe key availability without hard-coding the name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
APIKey string
DefaultModel string
BaseURL string
HTTPClient *http.Client
Headers map[string]string
}
Options configures the NVIDIA provider.
APIKey is consulted first; when empty the NVIDIA_API_KEY environment variable is used. DefaultModel applies when loop.ProviderRequest.Model is empty. BaseURL defaults to https://integrate.api.nvidia.com/v1 and may be overridden to point at any OpenAI-compatible endpoint. HTTPClient and Headers are optional; Headers are merged into every outgoing request.
type Provider ¶
type Provider = openaicompat.Provider
Provider is an alias for the shared OpenAI-compatible provider so that nvidia.New continues to return *nvidia.Provider for back-compat.