Allow overriding config location with MEMGPT_CONFIG_PATH (#383)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
### Configuring the agent
|
||||
You can set agent defaults by running `memgpt configure`.
|
||||
You can set agent defaults by running `memgpt configure`, which will store config information at `~/.memgpt/config` by default.
|
||||
|
||||
The `memgpt run` command supports the following optional flags (if set, will override config defaults):
|
||||
|
||||
@@ -13,6 +13,12 @@ The `memgpt run` command supports the following optional flags (if set, will ove
|
||||
* `--no-verify`: (bool) Bypass message verification (default=False)
|
||||
* `--yes`/`-y`: (bool) Skip confirmation prompt and use defaults (default=False)
|
||||
|
||||
#### Updating the config location
|
||||
You can override the location of the config path by setting the enviornment variable `MEMGPT_CONFIG_PATH`:
|
||||
```
|
||||
export MEMGPT_CONFIG_PATH=/my/custom/path/config # make sure this is a file, not a directory
|
||||
```
|
||||
|
||||
|
||||
### Adding Custom Personas/Humans
|
||||
You can add new human or persona definitions either by providing a file (using the `-f` flag) or text (using the `--text` flag).
|
||||
|
||||
@@ -228,6 +228,8 @@ class MemGPTConfig:
|
||||
config_path = os.getenv("MEMGPT_CONFIG_PATH")
|
||||
else:
|
||||
config_path = MemGPTConfig.config_path
|
||||
|
||||
assert not os.path.isdir(config_path), f"Config path {config_path} cannot be set to a directory."
|
||||
return os.path.exists(config_path)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user