> python3 -mvenv .venv
> source .venv/bin/activate
> pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
> cp .env.example .env
将配置项修成合适的值
- 添加文档
> python main.py add --path <path> [--ignore-unsupported-file <true | false>] [--recursived <true | false>]
如果想支持pdf
, 安装依赖pip install pymupdf
如果想支持docx
、xlsx
、 pptx
、md
, 安装依赖pip install unstructured
- 问答模式
> python main.py --query <query>
- 搜索模式
> python main.py --query <query> [--top-k <int>]