mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-14 17:03:29 +03:00
eda619f454
# 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 ... |
||
---|---|---|
.. | ||
examples | ||
quivr_core | ||
scripts | ||
tests | ||
.gitignore | ||
.python-version | ||
CHANGELOG.md | ||
Dockerfile.test | ||
pyproject.toml | ||
README.md | ||
tox.ini |
quivr-core package
The RAG of Quivr.com
Contributors
Requirements
- Install poetry. Recommand the
pipx
install - (Optional) Install (
uv
)[https://github.com/astral-sh/uv] - git clone
quivr
git clone git@github.com:QuivrHQ/quivr.git
cd quivr/backend/core
-
Create virtual environement with your preferred tool
uv venv
-
Install
base
quivr-core environmentpoetry install -E base --with dev,test
-
Install pre-commit
pre-commit install
-
Run example
python examples/simple_question.py
Backend
- Install poetry. Recommand the
pipx
install - (Optional) Install (
uv
)[https://github.com/astral-sh/uv] - Clone
quivr
cd quivr/backend/
-
Create virtual environement with your preferred tool
uv venv
-
Install quivr-core monorepo
poetry install
-
Copy
.env.example
to.env
and modify env variables : step 2 : (https://docs.quivr.app/install#60-seconds-installation) -
Run backend-api
LOG_LEVEL=debug uvicorn quivr_api.main:app --log-level debug --reload --host 0.0.0.0 --port 5050 --workers 1