> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.nvidia.com/nemo/guardrails/v0.25.0/guardrails-python-sdk/nemoguardrails/llm/frameworks/llms.txt. # nemoguardrails.llm.frameworks ## Submodules * **[`nemoguardrails.llm.frameworks.default`](/nemo/guardrails/v0.25.0/guardrails-python-sdk/nemoguardrails/llm/frameworks/default)** * **[`nemoguardrails.llm.frameworks.registry`](/nemo/guardrails/v0.25.0/guardrails-python-sdk/nemoguardrails/llm/frameworks/registry)** ## Package Contents ### Functions | Name | Description | | ---------------------------------------------------------------------------------------- | ------------------------------------------------- | | [`_areset_frameworks`](#nemoguardrails-llm-frameworks-registry-_areset_frameworks) | - | | [`_reset_frameworks`](#nemoguardrails-llm-frameworks-registry-_reset_frameworks) | - | | [`get_default_framework`](#nemoguardrails-llm-frameworks-registry-get_default_framework) | - | | [`get_framework`](#nemoguardrails-llm-frameworks-registry-get_framework) | - | | [`register_framework`](#nemoguardrails-llm-frameworks-registry-register_framework) | Register an `LLMFramework` instance under `name`. | | [`set_default_framework`](#nemoguardrails-llm-frameworks-registry-set_default_framework) | - | ### API ```python nemoguardrails.llm.frameworks._areset_frameworks() -> None ``` async ```python nemoguardrails.llm.frameworks._reset_frameworks() -> None ``` ```python nemoguardrails.get_default_framework() -> str ``` ```python nemoguardrails.llm.frameworks.get_framework( name: str ) -> nemoguardrails.types.LLMFramework ``` ```python nemoguardrails.register_framework( name: str, framework: nemoguardrails.types.LLMFramework ) -> None ``` Register an `LLMFramework` instance under `name`. Validates two invariants before storing the instance: 1. The object structurally matches the `LLMFramework` Protocol (`create_model`, `register_provider`, `get_provider_names`, `reset`). 2. Its `reset` attribute is an `async` coroutine function. The registry awaits it directly during shutdown / test teardown. **Raises:** * `ValueError`: a framework is already registered under `name`. * `TypeError`: `framework` does not implement the `LLMFramework` Protocol, or its `reset` is not an async coroutine function. ```python nemoguardrails.set_default_framework( name: str ) -> None ``` ## Docs - [nemoguardrails.llm.frameworks.default](https://docs.nvidia.com/nemo/guardrails/v0.25.0/guardrails-python-sdk/nemoguardrails/llm/frameworks/default.md) - [nemoguardrails.llm.frameworks.registry](https://docs.nvidia.com/nemo/guardrails/v0.25.0/guardrails-python-sdk/nemoguardrails/llm/frameworks/registry.md)