aiq.embedder.nim_embedder#

Attributes#

Classes#

NIMEmbedderModelConfig

A NVIDIA Inference Microservice (NIM) embedder provider to be used with an embedder client.

Functions#

option_in_allowed_values(v)

Ensures option is allowed

nim_embedder_model(embedder_config, builder)

Module Contents#

allowed_truncate_values = ['NONE', 'START', 'END']#
option_in_allowed_values(v)#

Ensures option is allowed

TruncationOption#
class NIMEmbedderModelConfig(/, **data: Any)#

Bases: aiq.data_models.embedder.EmbedderBaseConfig

A NVIDIA Inference Microservice (NIM) embedder provider to be used with an embedder 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.

api_key: str | None = None#
base_url: str | None = None#
model_name: str = None#
truncate: TruncationOption = None#
model_config#

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

async nim_embedder_model(
embedder_config: NIMEmbedderModelConfig,
builder: aiq.builder.builder.Builder,
)#