nvidia

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 4 Imported by: 0

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

View Source
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.

View Source
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.

func New

func New(o Options) *Provider

New creates an NVIDIA provider that streams responses from integrate.api.nvidia.com (or any caller-supplied OpenAI-compatible endpoint) into Glue's normalized provider events.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL