This is unreleased documentation for Rasa Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).

Version: Main/Unreleased


def windows_safe_temporary_directory(
suffix: Optional[Text] = None,
prefix: Optional[Text] = None,
dir: Optional[Text] = None) -> Generator[Text, None, None]

Like tempfile.TemporaryDirectory, but works with Windows and long file names.

On Windows by default there is a restriction on long path names. Using the prefix below allows to bypass this restriction in environments where it's not possible to override this behavior, mostly for internal policy reasons.


LocalModelStorage Objects

class LocalModelStorage(ModelStorage)

Stores and provides output of GraphComponents on local disk.


def __init__(storage_path: Path) -> None

Creates storage (see parent class for full docstring).


def create(cls, storage_path: Path) -> ModelStorage

Creates a new instance (see parent class for full docstring).


def from_model_archive(
cls, storage_path: Path, model_archive_path: Union[Text, Path]
) -> Tuple[LocalModelStorage, ModelMetadata]

Initializes storage from archive (see parent class for full docstring).


def metadata_from_archive(
cls, model_archive_path: Union[Text, Path]) -> ModelMetadata

Retrieves metadata from archive (see parent class for full docstring).


def write_to(resource: Resource) -> Generator[Path, None, None]

Persists data for a resource (see parent class for full docstring).


def read_from(resource: Resource) -> Generator[Path, None, None]

Provides the data of a Resource (see parent class for full docstring).


def create_model_package(model_archive_path: Union[Text, Path],
model_configuration: GraphModelConfiguration,
domain: Domain) -> ModelMetadata

Creates model package (see parent class for full docstring).