llmp.components.settings.global_settings.GlobalSettings¶
- class llmp.components.settings.global_settings.GlobalSettings(*args, **kwargs)[source]¶
Configuration class to store the state of bools for different scripts access.
Initialize the Global Settings
Hierarchical order of config (next level overwrites the previous): 1. Default values 2. Environment variables 3. config.yaml 4. kwargs
- Parameters
config_path (str, optional) – Path to config.yaml. Defaults to “config.yaml”.
Attributes
BASE_PATHDEBUGOPENAI_API_KEYMethods
__init__([config_path])Initialize the Global Settings
Get root storage dir and logging dir in root path.
getenv(key[, default, set_env])Get an environment variable.
set_local_memory_dir(value)Set the local memory directory value.
set_local_storage_dir(value)Set the local memory directory value.
- __init__(config_path='config.yaml', **kwargs) None[source]¶
Initialize the Global Settings
Hierarchical order of config (next level overwrites the previous): 1. Default values 2. Environment variables 3. config.yaml 4. kwargs
- Parameters
config_path (str, optional) – Path to config.yaml. Defaults to “config.yaml”.
- get_local_dirs()[source]¶
Get root storage dir and logging dir in root path. For execution from different paths, this is needed to ensure that the local storage and memory dirs are always in the same place.