Class NvidiaAiProvider
java.lang.Object
uno.anahata.asi.agi.event.BasicPropertyChangeSource
uno.anahata.asi.agi.provider.AbstractAiProvider
uno.anahata.asi.openai.compatible.OpenAiChatCompletionsProvider
uno.anahata.asi.nvidia.NvidiaAiProvider
- All Implemented Interfaces:
PropertyChangeSource, Rebindable
Dedicated AI Provider for NVIDIA NIM microservices using their OpenAI-compatible API.
Connects to https://integrate.api.nvidia.com/v1 to access NVIDIA NIM models
including Nemotron, DeepSeek-R1, Qwen, and Llama reasoning models.
- Author:
- anahata
-
Field Summary
Fields inherited from class AbstractAiProvider
MARKUP_TABLE_HEADERFields inherited from class BasicPropertyChangeSource
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new NVIDIA AI provider with stable UUID "Nvidia". -
Method Summary
Modifier and TypeMethodDescriptionprotected OpenAiCompatibleModelcreateModel(com.fasterxml.jackson.databind.JsonNode node) Constructs a concrete model instance for this provider.Gets a template or hint string to display when the API keys file is empty.booleanisRetryable(int statusCode, String responseBody) Determines if an HTTP status code or response body indicates a transient failure that should trigger a retry or rotation.Methods inherited from class OpenAiChatCompletionsProvider
createHttpClient, createRequestBuilder, listModelsMethods inherited from class AbstractAiProvider
addModel, addModels, ensureKeysFileExists, findModels, getAllDisplayModels, getAllSupportedActions, getCachedApiModel, getCurrentKey, getEnabledModels, getKeyPoolSize, getKeysAcquisitionUri, getKeysFilePath, getModel, getModels, getModelsDirectory, getProviderDirectory, getProviderId, getUnloadableModelsDirectory, hasKeys, hokusPocus, initialize, isEffectivelyEnabled, loadModelsFromDisk, persist, refreshCachedApiModels, reloadKeyPool, reloadKeyPoolIfNeeded, remove, removeModel, testConnection, toMarkupRow, toMarkupRowMethods inherited from class BasicPropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, rebind, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PropertyChangeSource
getPropertyChangeSupport
-
Constructor Details
-
NvidiaAiProvider
public NvidiaAiProvider()Constructs a new NVIDIA AI provider with stable UUID "Nvidia".
-
-
Method Details
-
createModel
Constructs a concrete model instance for this provider.Creates a specialized
NvidiaModelthat configures reasoning and thought extraction.- Overrides:
createModelin classOpenAiChatCompletionsProvider- Parameters:
node- The JSON node containing model metadata.- Returns:
- A new model instance.
-
isRetryable
Determines if an HTTP status code or response body indicates a transient failure that should trigger a retry or rotation.Checks for common OpenAI-compatible error codes (429, 503, 500, 499, 408).
Adds NVIDIA-specific error checks for GPU VRAM exhaustion and engine loop failures.
- Overrides:
isRetryablein classOpenAiChatCompletionsProvider- Parameters:
statusCode- The HTTP status code.responseBody- The raw response body.- Returns:
- true if retryable, false otherwise.
-
getApiKeyHint
Gets a template or hint string to display when the API keys file is empty.Implementation details: Provides a standard header hint for the multi-key configuration file.
Provides the NVIDIA-specific key hint for the api_keys.txt configuration file.
- Overrides:
getApiKeyHintin classOpenAiChatCompletionsProvider- Returns:
- The API key hint text.
-

