Improve ai review action v2 #115
Workflow file for this run
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
name: "build-test" | |
on: # rebuild any PRs and main branch changes | |
pull_request: | |
push: | |
branches: | |
- main | |
- "releases/*" | |
env: | |
OPENAI_ACCESS_TOKEN: ${{ secrets.OPENAI_ACCESS_TOKEN }} | |
OPENAI_ORGANIZATION_ID: ${{ secrets.OPENAI_ORGANIZATION_ID }} | |
REVIEW_BOT_USER_TOKEN: ${{ secrets.REVIEW_BOT_USER_TOKEN }} | |
REVIEW_END_POINT: ${{ secrets.REVIEW_END_POINT }} | |
TEST_MODE: true | |
WORKFLOW_FILE_PATH: ./.github/workflows/test.yml | |
jobs: | |
test: # make sure the action works on a clean machine without building | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: AI auto review | |
id: ai-review | |
uses: ./ | |
with: | |
ROLE_PROMPT: "You are an advanced English Language Teaching Assistant AI. Your task involves reviewing and providing feedback on student submissions, paying meticulous attention to grammar, punctuation, and style errors." | |
USER_PROMPT: | | |
The conversation should include the following: | |
- The specific Discord channel the conversation takes place in. | |
- The initial question, marked with "Student: ", outlining the student's doubt. | |
- The instructor's response, labelled with "Instructor: ", that provides a solution. | |
- A follow-up question for clarification, again starting with "Student: ", to delve into what the instructor meant. | |
Ensure that the student applies the lessons they learned in the current level: | |
- Provide context, steps taken, and error messages for both the initial question and the follow-up. | |
- Frame questions around the "why" and "how" aspects. | |
- Ask for additional examples, if necessary. | |
- Thank the instructor in a proper and considerate manner. | |
The feedback should focus on the following areas (with the ideal condition in brackets): | |
1. Providing Context & Background (The student delivers clear and detailed context, steps taken, and error messages). | |
2. Clarity (The conversation is clear and easy to understand throughout). | |
3. Expressing Thanks (The student thanks the instructor genuinely and appropriately). | |
4. Appropriate Tone & Etiquette (The student maintains a professional and respectful tone throughout the conversation). | |
Make sure to identify and highlight all grammar, punctuation, and style errors. | |
The student's submission will be as follows: | |
${SUBMISSION} |