Skip to content

Commit 0a9f1d5

Browse files
authored
GH-682: Zero shot classification with openai api (#700)
1 parent 214e0a5 commit 0a9f1d5

File tree

11 files changed

+425
-234
lines changed

11 files changed

+425
-234
lines changed

.github/workflows/build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ jobs:
1616
- name: Lint with flake8
1717
run: flake8 . --max-complexity 10 --ignore E501,W504,W605
1818
- name: Test with tox
19-
run: tox -e py37
19+
run: |
20+
tox -e traditional

.github/workflows/ci-examples.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
pull_request:
3-
branches: [ master ]
3+
branches: [ main ]
44
types:
55
- labeled
66

.github/workflows/ci-prompt.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
pull_request:
3+
branches: [ main ]
4+
types:
5+
- labeled
6+
- synchronize
7+
8+
jobs:
9+
ci-prompt:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Get PR Labels
13+
env:
14+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
run: |
16+
PR_LABELS=$(gh pr view https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }} --json labels --jq '[.labels[].name]')
17+
echo "$PR_LABELS"
18+
echo "PR_LABELS=$PR_LABELS" >> $GITHUB_ENV
19+
- name: Checkout
20+
if: contains(env.PR_LABELS, 'ci-prompt')
21+
uses: actions/checkout@v2
22+
- name: Set up Python 3.7
23+
if: contains(env.PR_LABELS, 'ci-prompt')
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: 3.7
27+
- name: Install dependencies
28+
if: contains(env.PR_LABELS, 'ci-prompt')
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install pytest tox
32+
- name: Run Test
33+
if: contains(env.PR_LABELS, 'ci-prompt')
34+
env:
35+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
36+
run: |
37+
tox -e prompt

0 commit comments

Comments
 (0)