quivr/backend/core/quivr_core/llm
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 fix: quiv core stream duplicate and quivr-core rag tests (#2852) 2024-07-12 06:07:39 -07:00
llm_endpoint.py feat: save and load brain (#3202) 2024-09-13 06:35:28 -07:00