quivr/backend/core/tests
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
..
processor feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00
__init__.py feat: quivr core minimal chat (#2803) 2024-07-09 06:22:16 -07:00
chunk_stream_fixture.jsonl fix: quiv core stream duplicate and quivr-core rag tests (#2852) 2024-07-12 06:07:39 -07:00
conftest.py feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00
fixture_chunks.py fix: quiv core stream duplicate and quivr-core rag tests (#2852) 2024-07-12 06:07:39 -07:00
test_brain.py feat: save and load brain (#3202) 2024-09-13 06:35:28 -07:00
test_chat_history.py feat: quivr core chat history (#2824) 2024-07-10 06:22:59 -07:00
test_chat_llm.py feat: Add get_model method to ModelRepository (#2949) 2024-08-06 08:44:12 -07:00
test_config.py feat: quivr api use quivr core (#2868) 2024-07-15 10:10:03 -07:00
test_llm_endpoint.py feat: quivr core tox test + parsers (#2929) 2024-07-30 18:49:12 +02:00
test_quivr_file.py feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00
test_quivr_rag.py feat: quivr core tox test + parsers (#2929) 2024-07-30 18:49:12 +02:00
test_utils.py fix: quiv core stream duplicate and quivr-core rag tests (#2852) 2024-07-12 06:07:39 -07:00