-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update retrieval result * Update deps * Update lint * Update yaml * Add lint * Update lint * Update test case * Add job name * Add status badge * Add coverage task * Fix coverage * Fix yaml * Add workflow permission * Add test coverage * Load knowledge * Update test threshold * Update coverage threshold * Update name
- Loading branch information
Showing
22 changed files
with
367 additions
and
606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,15 @@ on: | |
branches: | ||
- main | ||
- feature | ||
- 'releases/**' | ||
- "releases/**" | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -19,17 +24,38 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
# Semantic version range syntax or exact version of a Python version | ||
python-version: '3.10' | ||
python-version: "3.10" | ||
# Optional - x64 or x86 architecture, defaults to x64 | ||
architecture: 'x64' | ||
- name: Install dependencies | ||
architecture: "x64" | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
pip install poetry | ||
poetry install | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: false | ||
|
||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
- name: Install pre-commit | ||
shell: bash | ||
run: poetry run pip install pre-commit | ||
|
||
- name: Run Linter | ||
shell: bash | ||
run: poetry run make lint | ||
|
||
- name: Run Tests | ||
run: | | ||
make coveragetest | ||
env: | ||
DASHSCOPE_API_KEY: ${{ secrets.TESTDASHSCOPEKEY }} | ||
IS_PAI_RAG_CI_TEST: true | ||
|
||
- name: Get Cover | ||
uses: orgoro/[email protected] | ||
with: | ||
coverageFile: localdata/test_output/coverage_report.xml | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
thresholdAll: 0.5 # Total coverage threshold | ||
#thresholdNew: 0.9 # New files coverage threshold | ||
#thresholdModified: 0.9 # Modified files coverage threshold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# PAI-RAG: An easy-to-use framework for modular RAG. | ||
|
||
[![PAI-RAG CI](https://github.com/aigc-apps/PAI-RAG/actions/workflows/main.yml/badge.svg)](https://github.com/aigc-apps/PAI-RAG/actions/workflows/main.yml) | ||
|
||
## Get Started | ||
|
||
### Step1: Clone Repo | ||
|
||
```bash | ||
git clone [email protected]:aigc-apps/PAI-RAG.git | ||
``` | ||
|
@@ -45,6 +47,7 @@ curl -X 'POST' http://127.0.0.1:8000/service/query -H "Content-Type: application | |
``` | ||
|
||
- **多轮对话请求** | ||
|
||
```bash | ||
curl -X 'POST' http://127.0.0.1:8000/service/query -H "Content-Type: application/json" -d '{"question":"一键助眠是什么?"}' | ||
|
||
|
@@ -59,11 +62,11 @@ curl -X 'POST' http://127.0.0.1:8000/service/query -H "Content-Type: application | |
``` | ||
|
||
- **Agent简单对话** | ||
|
||
```bash | ||
curl -X 'POST' http://127.0.0.1:8000/service/query/agent -H "Content-Type: application/json" -d '{"question":"最近互联网公司有发生什么大新闻吗?"}' | ||
``` | ||
|
||
|
||
2. Retrieval Batch评估 | ||
|
||
```bash | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
ACCURATE_CONTENT_PROMPTS, | ||
PROMPT_MAP, | ||
) | ||
from os import environ | ||
|
||
import logging | ||
import traceback | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.