whiskerrag_toolkit


Namewhiskerrag_toolkit JSON
Version 0.0.1a1 PyPI version JSON
download
home_pageNone
SummaryA utility package for RAG operations
upload_time2025-02-11 13:43:25
maintainerNone
docs_urlNone
authorpetercat.ai
requires_python<4.0,>=3.8.1
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # WhiskerRAG-toolkit

[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
[![Python Version](https://img.shields.io/pypi/pyversions/whiskerRAG)](https://pypi.org/project/whiskerRAG/)
[![PyPI version](https://badge.fury.io/py/whiskerRAG.svg)](https://badge.fury.io/py/whiskerRAG)

WhiskerRAG-toolkit 是为 PeterCat 和 Whisker 项目开发的 RAG(Retrieval-Augmented Generation)工具包,提供完整的 RAG 相关类型定义和方法实现。

## 特性
- 领域建模类型
- 插件接口描述
- Github、S3 数据源加载器
- OpenAI Emedding

## 安装

使用 pip 安装:

```bash
pip install whiskerRAG
```

## 快速开始

该工具包提供两个核心模块:whiskerrag_utils 和 whiskerrag_types

```
from whiskerrag_utils.github.fileLoader import GithubFileLoader
from whiskerrag_types.interface import DBPluginInterface
from whiskerrag_types.model import Knowledge, Task, Tenant, PageParams, PageResponse
```

## 开发指南

环境配置
本项目使用 Poetry 进行依赖管理。首先安装 Poetry:

```
pip install poetry
```

安装依赖

```
poetry install
```

运行测试

```
# 运行单元测试
poetry run pytest


# 生成测试覆盖率报告
poetry run pytest --cov

# 生成 HTML 格式的覆盖率报告
poetry run pytest --cov --cov-report=html
open htmlcov/index.html
```

## 构建与发布

```
# 构建项目
poetry build

# 发布到 PyPI
poetry publish
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "whiskerrag_toolkit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": "petercat.ai",
    "author_email": "antd.antgroup@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/62/87/742e6ddaa8dd7178fbf5ebe7af6f02db054c8f6609b4e4c0f4f9a0351a00/whiskerrag_toolkit-0.0.1a1.tar.gz",
    "platform": null,
    "description": "# WhiskerRAG-toolkit\n\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n[![Python Version](https://img.shields.io/pypi/pyversions/whiskerRAG)](https://pypi.org/project/whiskerRAG/)\n[![PyPI version](https://badge.fury.io/py/whiskerRAG.svg)](https://badge.fury.io/py/whiskerRAG)\n\nWhiskerRAG-toolkit \u662f\u4e3a PeterCat \u548c Whisker \u9879\u76ee\u5f00\u53d1\u7684 RAG\uff08Retrieval-Augmented Generation\uff09\u5de5\u5177\u5305\uff0c\u63d0\u4f9b\u5b8c\u6574\u7684 RAG \u76f8\u5173\u7c7b\u578b\u5b9a\u4e49\u548c\u65b9\u6cd5\u5b9e\u73b0\u3002\n\n## \u7279\u6027\n- \u9886\u57df\u5efa\u6a21\u7c7b\u578b\n- \u63d2\u4ef6\u63a5\u53e3\u63cf\u8ff0\n- Github\u3001S3 \u6570\u636e\u6e90\u52a0\u8f7d\u5668\n- OpenAI Emedding\n\n## \u5b89\u88c5\n\n\u4f7f\u7528 pip \u5b89\u88c5\uff1a\n\n```bash\npip install whiskerRAG\n```\n\n## \u5feb\u901f\u5f00\u59cb\n\n\u8be5\u5de5\u5177\u5305\u63d0\u4f9b\u4e24\u4e2a\u6838\u5fc3\u6a21\u5757\uff1awhiskerrag_utils \u548c whiskerrag_types\n\n```\nfrom whiskerrag_utils.github.fileLoader import GithubFileLoader\nfrom whiskerrag_types.interface import DBPluginInterface\nfrom whiskerrag_types.model import Knowledge, Task, Tenant, PageParams, PageResponse\n```\n\n## \u5f00\u53d1\u6307\u5357\n\n\u73af\u5883\u914d\u7f6e\n\u672c\u9879\u76ee\u4f7f\u7528 Poetry \u8fdb\u884c\u4f9d\u8d56\u7ba1\u7406\u3002\u9996\u5148\u5b89\u88c5 Poetry\uff1a\n\n```\npip install poetry\n```\n\n\u5b89\u88c5\u4f9d\u8d56\n\n```\npoetry install\n```\n\n\u8fd0\u884c\u6d4b\u8bd5\n\n```\n# \u8fd0\u884c\u5355\u5143\u6d4b\u8bd5\npoetry run pytest\n\n\n# \u751f\u6210\u6d4b\u8bd5\u8986\u76d6\u7387\u62a5\u544a\npoetry run pytest --cov\n\n# \u751f\u6210 HTML \u683c\u5f0f\u7684\u8986\u76d6\u7387\u62a5\u544a\npoetry run pytest --cov --cov-report=html\nopen htmlcov/index.html\n```\n\n## \u6784\u5efa\u4e0e\u53d1\u5e03\n\n```\n# \u6784\u5efa\u9879\u76ee\npoetry build\n\n# \u53d1\u5e03\u5230 PyPI\npoetry publish\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A utility package for RAG operations",
    "version": "0.0.1a1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a10f7c277aee1da19eeec196a2768784063570c01ebde053bd8529a8b0820245",
                "md5": "1b441e4c23c04d48a0e78f72b01d8ca2",
                "sha256": "d470baa62a24b9f537f97ae99423e507543efd10da9f4fd1238f7627c74046e2"
            },
            "downloads": -1,
            "filename": "whiskerrag_toolkit-0.0.1a1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1b441e4c23c04d48a0e78f72b01d8ca2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 18819,
            "upload_time": "2025-02-11T13:43:23",
            "upload_time_iso_8601": "2025-02-11T13:43:23.080172Z",
            "url": "https://files.pythonhosted.org/packages/a1/0f/7c277aee1da19eeec196a2768784063570c01ebde053bd8529a8b0820245/whiskerrag_toolkit-0.0.1a1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6287742e6ddaa8dd7178fbf5ebe7af6f02db054c8f6609b4e4c0f4f9a0351a00",
                "md5": "1a6b39ae2fa3e12e6bfb08c0a8cd7760",
                "sha256": "f0fbcbc7fa7e827a83a35ec5cac4128c58ecc01405180165395b7f32a8d05eab"
            },
            "downloads": -1,
            "filename": "whiskerrag_toolkit-0.0.1a1.tar.gz",
            "has_sig": false,
            "md5_digest": "1a6b39ae2fa3e12e6bfb08c0a8cd7760",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 11389,
            "upload_time": "2025-02-11T13:43:25",
            "upload_time_iso_8601": "2025-02-11T13:43:25.594883Z",
            "url": "https://files.pythonhosted.org/packages/62/87/742e6ddaa8dd7178fbf5ebe7af6f02db054c8f6609b4e4c0f4f9a0351a00/whiskerrag_toolkit-0.0.1a1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-11 13:43:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "whiskerrag_toolkit"
}
        
Elapsed time: 0.41715s