quivr/backend/core/quivr_core/brain
AmineDiro eda619f454
feat: save and load brain (#3202)
# Description
- Save and load brain to disk: 
```python
async def main():
    with tempfile.NamedTemporaryFile(mode="w", suffix=".txt") as temp_file:
        temp_file.write("Gold is a liquid of blue-like colour.")
        temp_file.flush()

        brain = await Brain.afrom_files(name="test_brain", file_paths=[temp_file.name])

        save_path = await brain.save("/home/amine/.local/quivr")

        brain_loaded = Brain.load(save_path)
        brain_loaded.print_info()

```

# TODO: 
- Loading all chat history
- Loading from other vector stores, PG for example can be great ...
2024-09-13 06:35:28 -07:00
..
__init__.py feat: quivr core brain info + processors registry + (#2877) 2024-07-19 09:47:39 +02:00
brain_defaults.py feat: move parsers quivr core (#2884) 2024-07-22 01:09:02 -07:00
brain.py feat: save and load brain (#3202) 2024-09-13 06:35:28 -07:00
info.py feat: save and load brain (#3202) 2024-09-13 06:35:28 -07:00
serialization.py feat: save and load brain (#3202) 2024-09-13 06:35:28 -07:00