Skip to content

LlmMemory::Wernicke

Shohei Kameda edited this page May 11, 2023 · 1 revision

LlmMemory::Wernicke Class

The LlmMemory::Wernicke class provides a method to load data using different types of loaders.

Usage

The following is an example of how to use the LlmMemory::Wernicke class.

# Load data using the FileLoader
LlmMemory::Wernicke.load(:file, "path/to/file")

Class Methods

load(loader_name, *args) -> nil

Loads data using the specified loader.

Parameters:

  • loader_name (Symbol): The name of the loader to be used.
  • *args (Array): The arguments to be passed to the loader.

Raises an error if the specified loader is not found.

Exceptions

The LlmMemory::Wernicke class will raise an exception if the specified loader is not found: "Loader '#{loader_name}' not found.".

Further Information

The LlmMemory::Wernicke class is part of the LlmMemory module, which is designed for managing memory in a language model. The class provides a unified interface for different loaders, making it easy to change these components as needed. The class uses the Factory design pattern to create instances of loaders. The specific loader to be used is specified when calling the load method.