Adapter
Adapter for guardrail components.
NeMoLMAdapter(**kwargs)
Bases: BaseChatModel
LangChain ChatModel that delegates to a gllm_inference LM invoker.
Pass lm_invoker to supply the primary invoker; the model identifier is
derived from it automatically via lm_invoker.model_id. The model
field is optional and exists so NeMo's initializer can set it when the
adapter is registered as a provider — you do not need to pass it directly.
Attributes:
| Name | Type | Description |
|---|---|---|
model |
str | None
|
Model identifier string. |
temperature |
float | None
|
Sampling temperature. |
max_tokens |
int | None
|
Maximum tokens to generate. |
top_p |
float | None
|
Top-p sampling parameter. |
lm_invoker |
BaseLMInvoker | None
|
Primary LM invoker. |
fallback_lms |
list[BaseLMInvoker]
|
Ordered fallback invokers tried on BaseInvokerError or TimeoutError from the primary. |
Initializes a new instance of the NeMoLMAdapter class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Any
|
Additional configuration for the language model. |
{}
|