Skip to content

Commit

Permalink
GH-682: Zero shot classification with openai api (#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
rain1024 committed Jul 28, 2023
1 parent 214e0a5 commit 0a9f1d5
Show file tree
Hide file tree
Showing 11 changed files with 425 additions and 234 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ jobs:
- name: Lint with flake8
run: flake8 . --max-complexity 10 --ignore E501,W504,W605
- name: Test with tox
run: tox -e py37
run: |
tox -e traditional
2 changes: 1 addition & 1 deletion .github/workflows/ci-examples.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
pull_request:
branches: [ master ]
branches: [ main ]
types:
- labeled

Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/ci-prompt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
pull_request:
branches: [ main ]
types:
- labeled
- synchronize

jobs:
ci-prompt:
runs-on: ubuntu-latest
steps:
- name: Get PR Labels
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_LABELS=$(gh pr view https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }} --json labels --jq '[.labels[].name]')
echo "$PR_LABELS"
echo "PR_LABELS=$PR_LABELS" >> $GITHUB_ENV
- name: Checkout
if: contains(env.PR_LABELS, 'ci-prompt')
uses: actions/checkout@v2
- name: Set up Python 3.7
if: contains(env.PR_LABELS, 'ci-prompt')
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
if: contains(env.PR_LABELS, 'ci-prompt')
run: |
python -m pip install --upgrade pip
pip install pytest tox
- name: Run Test
if: contains(env.PR_LABELS, 'ci-prompt')
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
tox -e prompt
Loading

0 comments on commit 0a9f1d5

Please sign in to comment.