We use Poetry to manage dependencies.
poetry shell
poetry install
Create testdata
directory in the root directory and add files.
Now we only support
.md
files.
Use pre-commit.
pre-commit install
(Optional) Create a .env
file in the root directory and add the following environment variables:
LANGCHAIN_TRACING_V2=true
LANGCHAIN_API_KEY=<LANGCHAIN_API_KEY>
MODEL_API=<the model api from Mattermost>
Note:
- You can get the
LANGCHAIN_API_KEY
from LangSmith.- Get the
MODEL_API
from Mattermost.
預設使用port:6333
如果要新增或修改資料請使用此方法
cd vectorDB
docker-compose -f addData/docker-compose.yml up -d
cd vectorDB
docker build -t polyhistor:db .
docker run -d --restart always -p 6333:6333 --name polyhistor_qdrant polyhistor:db
Run ollama:
ollama serve
Default embedding model is
chevalblanc/acge_text_embedding
and default language model isqwen:4b
.
Open a new terminal and run the following command:
cd src
python main.py
Then you can ask questions to the model.
If you want to exit, type bye
.