A utility package for RAG operations
Project description
WhiskerRAG
WhiskerRAG 是为 PeterCat 和 Whisker 项目开发的 RAG(Retrieval-Augmented Generation)工具包,提供完整的 RAG 相关类型定义和方法实现。
特性
- 领域建模类型
- 插件接口描述
- Github、S3 数据源加载器
- OpenAI Emedding
安装
使用 pip 安装:
pip install whiskerrag
快速开始
该工具包提供两个核心模块:whiskerrag_utils 和 whiskerrag_types
from whiskerrag_types.interface import DBPluginInterface, TaskEngineInterface
from whiskerrag_types.model import Knowledge, Task, Tenant, PageParams, PageResponse
开发指南
环境设置
- 克隆项目
git clone https://github.com/your-username/whiskerRAG-toolkit.git
cd whiskerRAG-toolkit
- 创建并激活虚拟环境
make setup
source venv/bin/activate
开发工作流
- 代码格式化
make format
- 运行测试
# 运行所有测试
make test
# 运行特定测试文件
make test-file file=tests/test_specific.py
- 代码检查
# 运行所有检查(lint, type check, test)
make check
# 仅运行 lint
make lint
# 仅运行类型检查
make lint-mypy
- 生成测试覆盖率报告
make coverage
分支管理
创建新的功能分支:
make branch name=feature/new-feature
构建和发布
- 构建包
make build
- 检查构建的包
make check-build
- 发布到 TestPyPI
make upload-test
- 发布到 PyPI
make upload
- 创建新版本发布
# 本地发布
make release-local new_version=X.Y.Z
其他命令
- 清理构建文件和缓存:
make clean
- 更新依赖版本:
make update-deps
- 运行 pre-commit 钩子:
make pre-commit
项目结构
whiskerRAG-toolkit/
├── src/
│ ├── whiskerrag_utils/
│ └── whiskerrag_types/
├── requirements.txt
├── requirements-dev.txt
├── setup.py
└── Makefile
贡献指南
- Fork 本仓库
- 创建特性分支 (
make branch name=feature/amazing-feature) - 提交更改 (
git commit -m 'Add some amazing feature') - 推送到分支 (
git push origin feature/amazing-feature) - 开启 Pull Request
许可证
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情
联系方式
项目维护者 - @petercat-ai
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
whiskerrag-0.0.3a2.tar.gz
(14.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file whiskerrag-0.0.3a2.tar.gz.
File metadata
- Download URL: whiskerrag-0.0.3a2.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
786dc5b41274e6e1b4eaa76bb5b34e46d06e2c4b18fd155ac6b249a96d655864
|
|
| MD5 |
b5333df3bbaee949392d97a827fce92f
|
|
| BLAKE2b-256 |
5b82a28e781e6451f48c026e82f810b5becbf754f72384f162ce3881696d63e4
|
File details
Details for the file whiskerrag-0.0.3a2-py3-none-any.whl.
File metadata
- Download URL: whiskerrag-0.0.3a2-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e758188240f120deba054eaf2d48a4fd65c3ef5b34a2ba3f2ed8077b550a9d08
|
|
| MD5 |
bfa2f8217cc3898ed382a3e0411b6416
|
|
| BLAKE2b-256 |
dd6de26c7d5bb01afcc372b5f322d8e1f99496e598770a81f957161355f58dc7
|