nat.llm.nim_llm#

Classes#

NIMModelConfig

An NVIDIA Inference Microservice (NIM) llm provider to be used with an LLM client.

Functions#

nim_model(llm_config, _builder)

Module Contents#

class NIMModelConfig(/, **data: Any)#

Bases: nat.data_models.llm.LLMBaseConfig, nat.data_models.retry_mixin.RetryMixin, nat.data_models.optimizable.OptimizableMixin, nat.data_models.temperature_mixin.TemperatureMixin, nat.data_models.top_p_mixin.TopPMixin, nat.data_models.thinking_mixin.ThinkingMixin

An NVIDIA Inference Microservice (NIM) llm provider to be used with an LLM client.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

api_key: str | None = None#
base_url: str | None = None#
model_name: str = None#
max_tokens: pydantic.PositiveInt = None#
async nim_model(
llm_config: NIMModelConfig,
_builder: nat.builder.builder.Builder,
)#