quivr/backend/core
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
..
examples feat: save and load brain (#3202) 2024-09-13 06:35:28 -07:00
quivr_core feat: save and load brain (#3202) 2024-09-13 06:35:28 -07:00
scripts fix: quivr core fix tests (#2935) 2024-08-01 06:54:43 -07:00
tests feat: save and load brain (#3202) 2024-09-13 06:35:28 -07:00
.gitignore feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00
.python-version feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00
CHANGELOG.md chore(main): release core 0.0.14 (#2945) 2024-09-10 02:00:39 -07:00
Dockerfile.test fix: quivr core fix tests (#2935) 2024-08-01 06:54:43 -07:00
pyproject.toml chore(main): release core 0.0.14 (#2945) 2024-09-10 02:00:39 -07:00
README.md feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00
tox.ini feat: quivr core 0.1 (#2970) 2024-09-02 10:20:53 +02:00

quivr-core package

The RAG of Quivr.com

Contributors

Requirements

  1. Install poetry. Recommand the pipx install
  2. (Optional) Install (uv)[https://github.com/astral-sh/uv]
  3. git clone quivr
git clone git@github.com:QuivrHQ/quivr.git
cd quivr/backend/core
  1. Create virtual environement with your preferred tool

    uv venv
    
  2. Install base quivr-core environment

    poetry install -E base --with dev,test
    
  3. Install pre-commit

    pre-commit install
    
  4. Run example

    python examples/simple_question.py
    

Backend

  1. Install poetry. Recommand the pipx install
  2. (Optional) Install (uv)[https://github.com/astral-sh/uv]
  3. Clone quivr
cd quivr/backend/
  1. Create virtual environement with your preferred tool

    uv venv
    
  2. Install quivr-core monorepo

    poetry install
    
  3. Copy .env.example to .env and modify env variables : step 2 : (https://docs.quivr.app/install#60-seconds-installation)

  4. Run backend-api

LOG_LEVEL=debug uvicorn quivr_api.main:app --log-level debug --reload --host 0.0.0.0 --port 5050 --workers 1